Failed to refresh access token. { "error" : "invalid_client" } on perfectly good client

820 views
Skip to first unread message

Zweitze

unread,
Jul 17, 2014, 6:34:29 AM7/17/14
to adwor...@googlegroups.com
Hi,

This morning a Google.Api.Ads.Common.Lib.AdsOAuthException occurred:
Failed to refresh access token.
{
"error" : "invalid_client"
}

Unfortunately the .NET library destroyed all extra information, so I don't have response headers, HTTP status code etc.
Anyway, the error occurred a eight times in total, between 05.25h and 07.41h (CEST), but in that period we also did manage to retrieve access tokens. Before that, or after that, we had no problems.

So, what does the error mean? Obviously it doesn't mean that the supplied clientid and clientsecret do not exist.
And how does one handle this error? Can one retry the call?

Thanks in advance!

Dominik R

unread,
Jul 17, 2014, 7:14:00 AM7/17/14
to adwor...@googlegroups.com
Same here with the PHP library:

Fatal error: Uncaught exception 'OAuth2Exception' with message '{
  "error" : "invalid_client"
}' in AdWords/Google/Api/Ads/Common/Util/SimpleOAuth2Handler.php:121

Danial Klimkin

unread,
Jul 17, 2014, 8:12:09 AM7/17/14
to adwor...@googlegroups.com
Hello,


Did you update the client libraries recently or are they the same you've used before?


-Danial, AdWords API Team.

oseemann

unread,
Jul 17, 2014, 9:04:38 AM7/17/14
to adwor...@googlegroups.com
We're experiencing the same issue, but the errors are transient. They happen sometimes for some accounts and are not reproducible.

It started approx. 11 hours ago.


On Thursday, July 17, 2014 12:34:29 PM UTC+2, Zweitze wrote:

Danial Klimkin

unread,
Jul 17, 2014, 9:06:41 AM7/17/14
to adwor...@googlegroups.com
We are looking into this issue, I'll update this thread once we have any updates.


-Danial, AdWords API Team.

Zweitze

unread,
Jul 17, 2014, 9:47:49 AM7/17/14
to adwor...@googlegroups.com
In my case: I use .NET 16.7.

Call stack:
Google.Api.Ads.AdWords.v201402.FeedMappingService.get (Selector selector)
Google.Api.Ads.Common.Lib.AdsSoapClient.Invoke (String methodName, Object[] parameters)
Google.Api.Ads.Common.Lib.AdsSoapClient.MakeApiCall (String methodName, Object[] parameters)
Google.Api.Ads.AdWords.Lib.AdWordsSoapClient.InitForCall (String methodName, Object[] parameters)
Google.Api.Ads.Common.Lib.OAuth2ProviderBase.GetAuthHeader ()
Google.Api.Ads.Common.Lib.OAuth2ProviderBase.RefreshAccessTokenIfExpiring ()
Google.Api.Ads.Common.Lib.OAuth2ProviderForApplications.RefreshAccessToken ()
Google.Api.Ads.Common.Lib.OAuth2ProviderForApplications.RefreshAccessTokenInOfflineMode ()

The call went this morning OK for (probably) a dozen or so times, and failed eight times. Every time the same RefreshToken, ClientId and ClientSecret were passed. It didn't happen on previous days / weeks / months.

NET_Api_User

unread,
Jul 17, 2014, 10:29:21 PM7/17/14
to adwor...@googlegroups.com
+1. We're seeing a huge number of these errors - on about 2% of our calls. Retrying seems to help. We moved to the latest .NET release recently. 

Danial Klimkin

unread,
Jul 21, 2014, 6:02:06 AM7/21/14
to adwor...@googlegroups.com
Hello All,


We've identified this was an internal issue. The relevant team noticed it and resolved it quickly, this should no longer cause an error.


-Danial, AdWords API Team.

Gal Gubesi

unread,
Sep 29, 2014, 12:03:20 PM9/29/14
to adwor...@googlegroups.com
Hi, 

Any news on this one? I started getting them daily lately

Thanks
Reply all
Reply to author
Forward
Message has been deleted
0 new messages