oauth2 token issue

84 views
Skip to first unread message

Jade Huang

unread,
Jan 30, 2024, 5:15:43 AM1/30/24
to Google Ads API and AdWords API Forum
hi,

 I have an issue about adding secret for  OAuth 2.0 
previous token already expired so I add for a new secret for the new token ,
but then it still show me message down below , is there any way to solve it ? when I add a new secret can I use it right away??

Jade

com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request

POST https://oauth2.googleapis.com/token

{

"error": "invalid_grant",

"error_description": "Token has been expired or revoked."

}

Google Ads API Forum Advisor

unread,
Jan 30, 2024, 5:23:31 AM1/30/24
to aiai1...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for contacting the Google Ads API support team.

By reviewing your concern, I understand that your query is regarding expiry of a refresh token. According to the Google Ads API documentation, 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 can follow the following steps to avoid the refresh token expiring in 7 days:
  • Go to the Google API Console and navigate to the OAuth consent screen.
  • Change the publishing status to "In production".
If you still have any queries/concerns related to this, you can get back to us.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02ryeTH:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages