{'error': 'invalid_grant', 'error_description': 'Bad Request'} about OAuth

37 views
Skip to first unread message

Dora Miss

unread,
Aug 23, 2022, 2:46:04 AM8/23/22
to Google Ads API and AdWords API Forum

Hi team!
I’m using developer_token to confirm the iap from Google Console in my game, recently I got an error
{'error': 'invalid_grant', 'error_description': 'Bad Request'}
Please tell me the reason for the error and the solution, to continue the correct operation.
Have a nice day!

 My email address: gettyri...@gmail.com
OAuth JSON: 
{"web":{"client_id":"115920105602-03ati1f80n5shibncfd1pmh4of5rdj1s.apps.googleusercontent.com","project_id":"bonza-boom-d1dad","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"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","redirect_uris":["http://localhost"]}}

Google Ads API Forum Advisor

unread,
Aug 23, 2022, 3:55:15 AM8/23/22
to huangxi...@gmail.com, adwor...@googlegroups.com

Hi Dora,
 

Thanks for reaching out to the Google Ads API team. I hope you are doing well today.
 

Upon checking your concern, I can see that you’ve encountered the invalid_grant error. Kindly note that the invalid_grant usually indicates an issue with the refresh token. That said, you’ll need to regenerate credentials and refresh tokens. You may refer here to this guide for the steps on how you can regenerate credentials and refresh tokens.


If the issue still persists, then you may please provide the complete request and response logs with the request-id generated in said format for the API error. You may enable logging so you’ll get complete request and response logs along with request-id by navigating to the Client libraries > Your client library (ex Java) > Logging documentation, which you can access from this link
 

You can provide it via Reply privately to the author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.
 

Regards,

Google Logo
Darwin
Google Ads API Team
 


ref:_00D1U1174p._5004Q2dmaqr:ref
Reply all
Reply to author
Forward
0 new messages