Important to note that this usually happens after a couple of days, so the access tokens that we generate initially (every 45 minutes for atleast a couple of days) all seem to work well. It's just that very suddenly they become invalid and we can't generate a new valid one.
On Monday, April 8, 2024 at 1:08:19 PM UTC+2 Selcuk wrote: > Hello! > > We are running into the following problem: > > We have a platform where customers can connect their Google Ads account > and we fetch their campaigns / adgroups / ads etc. The flow is as follows: > > 1. The customer logs in with their Google Ads account.\ > 2. We get an auth token which we use to get a long-lived refresh token and > an access token > 3. The customer selects an ad account. > 4. We fetch the campaigns/adgroups/ads using the query endpoint every hour. > > Now, suddenly, the following has started to happen: > 1. We fetch the campaigns, and get the following error: > > org.springframework.web.client.HttpClientErrorException$Unauthorized: 401 > Unauthorized: "{<EOL> "error": {<EOL> "code": 401,<EOL> "message": > "Request had invalid authentication credentials. Expected OAuth 2 access > token, login cookie or other valid authentication credential. See > https://developers.google.com/identity/sign-in/web/devconsole-project.",<EOL> > > "status": "UNAUTHENTICATED"<EOL> }<EOL>}<EOL>" > > 2. We use our refresh token to generate a new access token (This succeeds, > important!) > 3. We try to fetch the campaigns again, and we get the exact same error as > above. > 4. We decide that we can no longer use the refresh token and drop the > Google Ads connection and send an email to the customer. > > We are very confused why this error is happening for so many customers all > of a sudden, what could the possible reasons be? The customers that have > had this happen to them (many!) have contacted us and assured us that they > have not touched anything in regards to the permissions for our app. > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 on the web visit https://groups.google.com/d/msgid/adwords-api/87003148-35fd-425f-89c4-ef802392a5b5n%40googlegroups.com.