0
votes

Up until today I have been able to use Google's api for exchanging an authorization code for an access token. Haven't had any problems with this for the past year. But now I'm getting a 403 status code. My POST body looks like this:

code=4%2FUwDPiS*********& redirect_uri=https%3A%2F%2Flocalhost%3A57081& client_id=123******& client_secret=123*******& scope=& grant_type=authorization_code

The api endpoint is:

https://www.googleapis.com/oauth2/v4/token/

The Google API playground works fine when exchanging authorization tokens.

I thought that maybe Google was getting strict and required https to the redirect (which I did not have originally). But even after adding https, it didn't help. Is it possible that Google is now blocking redirects to localhost? If not, what other problem could it be?

1
Whats the full error from Google?DaImTo
It only returns a 403 without an error message. I even tried creating a new credentials but that didn't help.Johann
403 is normally a quota violation doesn't normally hit on login.DaImTo
I just came across this page from Google on limits: support.google.com/cloud/answer/… But oddly it includes an error message that shows rate_limit_exceeded. I don't get that. Still, you may be correct about going over limits although I find that hard to believe since the app hasn't been released yet and I only sign in a few dozen times a day.Johann

1 Answers

0
votes

Either Google's OAuth service was down at the time or my limit on calling the api was reached. Have no idea what caused the problem but it worked 24 hours later. In the event that you suspect that your limit was reached, you should check out this link:

https://support.google.com/cloud/answer/9028764