You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having issues when I try to use "refreshAccessToken" function: invalid_request. So after so many hours wasted on this I tried to use the private "refreshToken_" function, which returned the main reason why it is an invalid request: Could not determine client ID from request.
Here is the code I'm trying:
var auth = new google_auth();
var oauth2Client = new auth.OAuth2(conf.cliend_id, conf.client_secret, conf.red_url);
var creds = {access_token: accessToken, // **I tried without this too**
refresh_token: refreshToken};
oauth2Client.setCredentials(creds);
oauth2Client.refreshAccessToken(function(err, tokens){
console.log("ERR: ", err); // keeps saying invalid_request 400 and nothing more
console.log("TOKENS: ", tokens); // NULL
Couldn't find a solution, so I tried this:
var auth = new google_auth();
var oauth2Client = new auth.OAuth2(conf.cliend_id, conf.client_secret, conf.red_url);
var creds = {access_token: accessToken, // **I tried without this too**
refresh_token: refreshToken};
oauth2Client.setCredentials(creds); // Tried without this too
oauth2Client.refreshToken_(refreshToken, function(err, tokens, response){
console.log("ERR: ", err); // keeps saying invalid_request 400 and nothing more.
console.log("RESPONSE: ", response); //bunch of stuff here, also where I found the reason for the error
console.log("TOKENS: ", tokens); // NULL
I am on server side using google-auth-library and googleapis.
How can I solve this? Is this a problem on my side or is there anything else I should know about this APIs?
The text was updated successfully, but these errors were encountered:
Not sure if the above code was copied verbatim or not, but you have a typo conf.cliend_id instead of conf.client_id. Again I'm not sure if this is just mis-copied, and I don't know anything about where your setting the conf object, but probably worth a double check.
I'm having issues when I try to use "refreshAccessToken" function:
invalid_request
. So after so many hours wasted on this I tried to use the private "refreshToken_" function, which returned the main reason why it is an invalid request:Could not determine client ID from request
.Here is the code I'm trying:
Couldn't find a solution, so I tried this:
I am on server side using
google-auth-library
andgoogleapis
.How can I solve this? Is this a problem on my side or is there anything else I should know about this APIs?
The text was updated successfully, but these errors were encountered: