Hello, Bryan, Thank you for your reply. Based on the link you share, I don't think the account we are dealing with is using Service Account. We are doing exactly what is described as "Installed application" in this link. We first get the access token and refresh token, which involves human authorization. Once we have the refresh token, we store it and later we obtain new access token, which is fully automated. This set of logic has been working for most of our accounts except the one I mentioned in my original email.
The issue is that, for this particular account, the refresh token seems to become invalid after a few times of use. Getting a new set of access token and refresh token through human authorization flow always solves the problem, temporarily. However, we want to root cause the issue as we don't want to involve human authorization once in a while. Is there a way to check why the refresh token becomes bad? Thanks, Gavin On Thursday, February 20, 2020 at 1:47:37 PM UTC-8, adsapiforumadvisor wrote: > > Hi Gavin, > > Thank you for reaching out to us. I see you’re encountering a Token > expiration error. The first error looks to be an error with the access > token not being refreshed and the refresh token not refreshing the access > token. The second error looks like the refresh token is not correctly > refreshing the access token, possibly due to using an incorrect token. In > this case, could you follow these steps > <https://developers.google.com/adwords/api/docs/guides/authentication#access_and_refresh_token> > to > re-obtain a new set of refresh and access tokens and see if that corrects > the error? Could I also ask if you are using a Service account > <https://developers.google.com/adwords/api/docs/guides/authentication#oauth2_service_accounts>? > > Service accounts are a little trickier to set up OAuth credentials for, and > the same functionality can be achieved by using OAuth2 Installed > Application Flow > <https://developers.google.com/adwords/api/docs/guides/authentication#an_alternative_to_service_accounts>, > > which will always persist the refresh token. Please let me know if you have > further questions or concerns. > > Thank you, > Bryan, Google Ads API Team > > > ref:_00D1U1174p._5001UV1eGg:ref > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 [email protected] To unsubscribe from this group, send email to [email protected] 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 "AdWords API and Google Ads API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/b0b660ee-d2ce-4614-a834-e38be6d663f9%40googlegroups.com.
