Got Token revoked error even App is in production

Hi Team,

I am using production App to connect our clients Ads accounts which are linked under one Ads MCC account and collect traffic data for last 8 years. Recently got the Invalid grant error to only 2 clients. But working good to all other clients. There is no change in App too.

{ "error": "invalid grant", "error description": "Token has been expired or revoked." }

Can you please clarify and suggest a solution?

0 1 115
1 REPLY 1

Hi @muruganaxotech,

Welcome to the Google Cloud Community!

Since it has been 8 years since you were using the app. Invalid grant means that the token you have no longer works. Google has made a change which will cause all refresh tokens to expire after seven days if the project that created it is still in the testing phase. The solution for this is to transition your Google Cloud Project from the testing phase to the production phase. But since your application is already In Production, you might have to generate new access tokens.

You can follow Stack Overflow user @ user20692394 workaround here.

  1. Go to https://console.cloud.google.com/apis/credentials/consent and change from the testing status to published.
  2. Delete the current token file.
  3. Authorize the API again by signing into your gmail account. You will be sent to a warning screen. From there, you can choose to proceed.
  4. When done you'll get a new token file

Relevant documents:

You may contact Google Cloud Support to further investigate your project. I hope this helps.

Best, 

Lawrence