Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Redirect URI in OAuth 2.0 Client IDs

Hello, there!

Could anybody help me?

I have a trouble with https://nutson.us/ as redirect URI

getting code
 
"response_type=code&"
f"client_id={credentials.client_id}&"
"state=google&"
"scope=openid&"
f"redirect_uri=https://nutson.us"
 
next make an request to getting access_token
https://oauth2.googleapis.com/token
and getting error {'error': 'invalid_grant', 'error_description': 'Bad Request'}
Solved Solved
0 2 3,794
1 ACCEPTED SOLUTION

Can you share the code that sends the initial OAuth request from your web application? If you are locally serving the application, using your live app’s redirect URI will produce this error, as shown from this related thread. For general causes of this error, you can review this other post. Finally, the documentation provides rules for allowed redirect URIs, which you can also check. 

View solution in original post

2 REPLIES 2

Can you share the code that sends the initial OAuth request from your web application? If you are locally serving the application, using your live app’s redirect URI will produce this error, as shown from this related thread. For general causes of this error, you can review this other post. Finally, the documentation provides rules for allowed redirect URIs, which you can also check. 

Thanks, great Idea!!! It was useful fo me.

King regards for You, Ernesto!