Refresh error exception while making api call with Google ads account

221 views
Skip to first unread message

Chethan U

unread,
Mar 5, 2023, 11:07:24 PM3/5/23
to Google Ads API and AdWords API Forum
Hi team, 
while making an API call with Google ads accounts, I'm getting below exception.
Raise exceptions.Refresherror(Google.auth.exceptions.RefreshError:('invalid_grant:Bad Request' , {'error' : 'invalid_grant' , 'error_description' : Bad Request'} )
Please let me know what's the issue. 

Google Ads API Forum Advisor

unread,
Mar 6, 2023, 5:59:19 AM3/6/23
to chetha...@gmail.com, adwor...@googlegroups.com

Hello Anatoliy,

Hope you're safe and doing fine. I'm from the Google Ads API team and I'll be assisting you with this.

With regard to the invalid_grant error that you've encountered, this may imply that the access or refresh token being passed in your request is incorrect or invalid. Please note that the email address used to generate those credentials should have the appropriate access to the production account that you're trying to make an API request.

I suggest that you check on your end if the publishing status of your Google project is Testing. If yes, then please change the publishing status to In production and try again. You may refer here for more information. On the other hand, if the publishing status is already correct, kindly regenerate your OAuth credentials and try again. Please see below guides to learn more on generating the OAuth credentials and setting up the client libraries.

If the issue persists, please share with us the details below via Reply privately to author option:

Regards,

Google Logo Google Ads API Team


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