Personal is there any way I can generate a token through a WebRequest? Because every time I use the Google Drive function, I need to open the authentication page only to generate the access Token, is there any way I can do it through WebRequest?
Personal is there any way I can generate a token through a WebRequest? Because every time I use the Google Drive function, I need to open the authentication page only to generate the access Token, is there any way I can do it through WebRequest?
var clientrest = new RestClient(baseUrl);
var requestToken = new RestRequest("oauth/token", Method.POST);
requestToken.AddParameter("grant_type", "password");
requestToken.AddParameter("username", model.Login);
requestToken.AddParameter("password", model.Senha);
var responseToken = clientrest.Execute<TokenViewModel>(requestToken);
responseToken.Data.access_token; // acesso ao token
I used restsharp link