In case this is useful to anyone, here comes the answer: The reason is that the refresh token expires if inactive for 6 months - which has been the case in what I described above. source: https://developers.google.com/identity/protocols/oauth2#expiration
On Thursday, November 21, 2024 at 2:09:20 PM UTC+2 Alex Papageorgiou wrote: > Hi everyone, > > After several years of seamless access to the API, I’ve suddenly started > encountering the following error: > > RefreshError: ('invalid_grant: Bad Request', {'error': 'invalid_grant', > 'error_description': 'Bad Request'}) > > A few key points to note: > > > - The publishing status has been set to In production since the > beginning and hasn’t been changed. > - I used the API regularly (at least once a week) for the past two > years. However, I haven’t used it at all since April 2024, meaning there’s > been over six months of inactivity. > - No other settings have been altered, including those for the Cloud > account, Google Ads MCC, etc. > > > Here’s how my yaml file looks like, which I pass to client = > GoogleAdsClient.load_from_storage() > > developer_token: xxxx....... > client_id: xxxxx.......apps.googleusercontent.com > client_secret: xxxx....... > refresh_token: xxxxxxxx........ > use_proto_plus: True > > I’ve tested both version 16 of the API and the latest version, but neither > worked. > > Were there any changes to the Google Ads API or OAuth processes over the > past six months that might be causing this? > I’d appreciate any guidance on how to solve this. > Thank you, > Alex > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "Google Ads API and AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/adwords-api/161960c9-b1e1-4601-bc0e-bbdaa152a37en%40googlegroups.com.