Rotate/reset Google API credentials

310 views
Skip to first unread message

Vaibhav Rai

unread,
Jan 6, 2023, 3:13:24 AM1/6/23
to Google Ads API and AdWords API Forum
Hey,

I would like to reset my Google OAuth credentials. 
I have a bunch of refresh tokens which were obtained by the current Google OAuth credentials.

If I reset/change the credentials, will my existing refresh tokens be invalidated?


Google Ads API Forum Advisor

unread,
Jan 6, 2023, 4:52:08 AM1/6/23
to vai...@tydo.com, adwor...@googlegroups.com
Hi Valibhav,

Thank you for reaching us out. I am Sherwin from Google Ads API support team. I hope that you are doing well today.

Moving forward to your concern, are you referring to Oauth credentials? If yes, then when you reset the the Oauth credentials (client-id and client secret), please note the refresh token expires because of the reasons below:
  • The user has revoked your app's access.
  • The refresh token has not been used for six months.
  • The user changed passwords and the refresh token contains Gmail scopes.
  • The user account has exceeded a maximum number of granted (live) refresh tokens.
  • The user belongs to a Google Cloud Platform organization that has session control policies in effect.

Therefore, if the refresh token expires, you will need to regenerate a new one. You may see this guide regarding refresh token expiration.

Kind regards,
Google Logo
Sherwin Vincent
Google Ads API Team
 


ref:_00D1U1174p._5004Q2haN1Z:ref

Vaibhav Rai

unread,
Jan 6, 2023, 5:04:45 AM1/6/23
to Google Ads API Forum Advisor, adwor...@googlegroups.com
Hey Sherwin,

Thank you for getting back to me.

Yes, I was referring to OAuth credentials. 

If none of the below reasons are met, and I update my client secret, the refresh tokens will not expire? 

If it does, is there a way around this issue (that, I can update the client secret but the refresh tokens don't expire)? 
Reply all
Reply to author
Forward
0 new messages