Token has been expired or revoked

161 views
Skip to first unread message

fatima Ajij

unread,
Feb 17, 2021, 5:16:59 AM2/17/21
to AdWords API and Google Ads API Forum
Hi I have been using rest methods to integrate Google Ads API in C#. Everything seemed to be working fine but all off sudden I started getting 400 response with the error message.

{
    "error": "invalid_grant",
    "error_description": "Token has been expired or revoked."
}

As mentioned above that I am not using client library but instead using restsharp and testing all my end points in postman also.
I am using test account at the moment and suddenly it is failing.

Any reason why it is happening? My refresh token is also valid as I have been using this for one week. I have also not reached to the limit of refresh token as I have only generated refresh token 3 to 4 times when I was trying to set up the accounts.

Regards,
Fatima

fatima Ajij

unread,
Feb 17, 2021, 5:17:34 AM2/17/21
to AdWords API and Google Ads API Forum

I believe the validity of refresh token is life long then why it is happening?

Google Ads API Forum Advisor Prod

unread,
Feb 17, 2021, 11:56:44 AM2/17/21
to fatim...@gmail.com, adwor...@googlegroups.com

Hi Fatima,

Thank you for reaching out. Here are some common causes for the refresh token expiration. One of them is “A Google Cloud Platform project with an OAuth consent screen configured for an external user type and a publishing status of "Testing" is issued a refresh token expiring in 7 days.” You could change the publishing status to production to avoid this issue.

Thanks and regards,
Xiaoming, Google Ads API Team
 

Google Logo
Xiaoming
Google Ads API Team
 


ref:_00D1U1174p._5004Q2CRt64:ref

fatima Ajij

unread,
Feb 18, 2021, 11:04:47 AM2/18/21
to Google Ads API Forum Advisor Prod, adwor...@googlegroups.com
Thank you for your response. 
Reply all
Reply to author
Forward
0 new messages