We've noticed a weird authentication error that was occurring on one of our application servers over the weekend. All of our MutateJobService.mutate API calls were failing with the error below across multiple accounts. The weird thing is all other API calls were unaffected and the MutateJobService.mutate API calls succeeded across our other application servers (which are all using the same OAuth2 credentials). After restarting the failing application instance the errors disappeared.
Is there a reason why the refresh would only fail for one API call and not for others? Similarly, why would the refresh only fail on one application instance and not others?
An unhandled exception occurred.
[Google.Api.Ads.Common.Lib.AdsOAuthException]: Failed to refresh access token.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Google Accounts</title><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0" /><link rel='stylesheet' type='text/css' href='
https://ssl.gstatic.com/accounts/o/1893590695-error_page_css_ltr.css'>
<style>@media screen and (max-width:500px) {#robot {background: none; min-height: 0; min-width: 0; padding: 0;}#stack_trace {display: none;}}
#oauth2_request_info_header {background-image: url("
https://ssl.gstatic.com/accounts/o/blank.gif");}</style></head><body ><div id="robot"></div><a href="//
www.google.com/" id="googlelogo"><img src="//
www.google.com/images/logo_sm.gif" alt="Google"></a><p class="large"><b>403.</b> <ins>That's an error.</ins></p><p class="large">You are not authorized to perform this request. <ins>That's all we know.</ins></p></body></html>
Stack Trace:
at Google.Api.Ads.Common.Lib.OAuth2ProviderForApplications.RefreshAccessTokenInOfflineMode()
at Google.Api.Ads.Common.Lib.OAuth2ProviderBase.GetAuthHeader()
at Google.Api.Ads.AdWords.Lib.AdWordsSoapClient.InitForCall(String methodName, Object[] parameters)
at Google.Api.Ads.Common.Lib.AdsSoapClient.MakeApiCall(String methodName, Object[] parameters)
at Google.Api.Ads.AdWords.v201306.MutateJobService.mutate(Operation[] operations, BulkMutateJobPolicy policy)
...