refresh_token update in the background

86 views
Skip to first unread message

Alex T

unread,
May 24, 2021, 7:03:40 AM5/24/21
to AdWords API and Google Ads API Forum
Preamble:
I use desktop app flow, generate a refresh_token and successfully get data from Google Ads.
But after about a week, the token stops working and I have to run authenticate_in_desktop_application.py again. (all actions from here)
- go to the browser 
- sign in to my Google Ads account
- And give permission on the OAuth2 consent screen

The question is as follows:
Is it possible to get a refresh_token once and then update it in the background, without starting the browser and all the follow up? 

Or, is it possible to increase refresh_token lifetime?

I would be grateful for any information.

Google Ads API Forum Advisor Prod

unread,
May 24, 2021, 9:48:02 PM5/24/21
to tverdohle...@gmail.com, adwor...@googlegroups.com
Hi Alex,

Thank you for posting your concern.

You may refer to this document to read more information about refresh token expiration. Since you are noticing that your refresh token expires every week, then it appears that the scenario below is happening at your end.
"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."

Unfortunately, this is already outside of our scope and would not be able to provide answer to your questions below. With this, I would suggest posting your questions on this support channel instead to get answer from the more equipped team for this topic.

"Is it possible to get a refresh_token once and then update it in the background, without starting the browser and all the follow up? 

Or, is it possible to increase refresh_token lifetime?
"

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q2HD9KV:ref

Alex T

unread,
May 26, 2021, 4:23:52 AM5/26/21
to AdWords API and Google Ads API Forum
Hi Ernie, thanks for the clarification.

вторник, 25 мая 2021 г. в 04:48:02 UTC+3, adsapiforumadvisor:
Reply all
Reply to author
Forward
0 new messages