getting a lot of authentication errors

386 views
Skip to first unread message

mspier...@bol.com

unread,
Apr 26, 2019, 4:06:55 AM4/26/19
to AdWords API and Google Ads API Forum
Hi,

We get a lot of authentication errors recently for our api calls. After some retries they sometime work sometimes not:

status = StatusCode.UNAUTHENTICATED
details = "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project."

We use the python client with a google-ads.yml file. 
This worked without any problems until now.
Is there a problem with the api currently?


Regards,

Manuel

googleadsapi...@google.com

unread,
Apr 26, 2019, 6:07:56 AM4/26/19
to adwor...@googlegroups.com
Hi Manuel,

Could you confirm if you followed the steps on this guide when generating your OAuth2 credentials? If not, could you follow the steps on that guide again then retry your request? Also, you have to make sure that the email address you are using to generate your OAuth2 credentials has an access to your Google Ads API account.

If the issue persist, could you provide the email address you used to generate your OAuth2 credentials so I could further check the issue? You may reply using the Reply privately to author option.

Thanks and regards,
Peter
Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@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 "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/04e908e4-6745-41fd-982e-6aa05e26732e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Charlie Flowers

unread,
Apr 26, 2019, 11:21:10 AM4/26/19
to AdWords API and Google Ads API Forum
I am also experiencing the same issue, using the Java client library. I have been successfully accessing the Ads API to pull reports for multiple client customers via the 'search' endpoint for the last month or so. Starting this morning intermittent 'UNAUTHENTICATED' errors began occurring unpredictably. By unpredictably, I mean:

-API requests using the same immutable Credentials object succeed both prior to and subsequent to the error.
-If a failed API request is repeated, it may succeed or may fail again.

These errors seem to occur on roughly 10% of API requests. Example:

19/04/26 10:51:19 WARN summary: FAILURE REQUEST SUMMARY. Method: google.ads.googleads.v1.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: xxxxxxxxx, RequestID: dVfS-CY45L7gCmsbebvunw, ResponseCode: UNAUTHENTICATED, Fault: Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project..

19/04/26 10:51:19 WARN AdWordsLogIngestion: Exception checking status for customer xxxxxxxxx

com.google.ads.googleads.v1.errors.GoogleAdsException: errors {

 error_code {

   authentication_error: AUTHENTICATION_ERROR

 }

 message: "Authentication of the request failed."

}


        at com.google.ads.googleads.v1.errors.GoogleAdsException$Factory.createException(GoogleAdsException.java:42)

   at com.google.ads.googleads.v1.errors.GoogleAdsException$Factory.createException(GoogleAdsException.java:34)



Again, we have not had any issues accessing the API until this morning. No code or environment changes on our end. Please let me know if you need any more info.


On Friday, April 26, 2019 at 4:06:55 AM UTC-4, mspier...@bol.com wrote:
Hi,

We get a lot of authentication errors recently for our api calls. After some retries they sometime work sometimes not:

status = StatusCode.UNAUTHENTICATEDy
details = "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project."

We use the python client with a google-ads.yml file. 

googleadsapi...@google.com

unread,
Apr 29, 2019, 10:28:21 AM4/29/19
to flowers...@gmail.com, AdWords API and Google Ads API Forum
Hello,

We've gotten a few reports of this issue. I'm following up with the engineering team to try to determine the cause, and will post here with any updates.

Regards,
Mike, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@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 "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.

mspier...@bol.com

unread,
Apr 30, 2019, 9:25:33 AM4/30/19
to AdWords API and Google Ads API Forum
Hi Mike,

The error seems to be more frequent now.
Is there already any update on this?

Kind regards,

Manuel

googleadsapi...@google.com

unread,
Apr 30, 2019, 10:12:38 AM4/30/19
to mspier...@bol.com, AdWords API and Google Ads API Forum
Hello,

Unfortunately, we don't have any updates yet. We are still investigating.

Regards,
Mike, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

googleadsapi...@google.com

unread,
Apr 30, 2019, 12:26:47 PM4/30/19
to mspier...@bol.com, AdWords API and Google Ads API Forum
Hello,

Can you please respond privately to me using the drop down at the top right of my post to provide the developer token you're using for the requests that are seeing this error?

Thanks,
Mike, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

UK Analytics

unread,
May 2, 2019, 2:50:27 PM5/2/19
to AdWords API and Google Ads API Forum
Hi Mike,

We are also having this issue. We started to receive unauthenticated errors starting some time on the 25th April from 8.00 to 17.00 UTC.

It seemed that the authentication errors are only returned for cancelled accounts. However, API calls for cancelled accounts would sometimes return successfully, on a seemingly random basis.

Beginning from approximately today or yesterday, it seemed that cancelled accounts would always return an authentication error, and never return successfully.

Since we need a method to identify cancelled accounts, we have started doing this by catching exceptions with the name 'UNAUTHENTICATED'. Could we confirm that cancelled accounts will continue to always return this error?

Thanks,
Adam

googleadsapi...@google.com

unread,
May 3, 2019, 8:11:38 AM5/3/19
to accuenan...@accuenmedia.com, AdWords API and Google Ads API Forum
Hello Adam,

Thanks for this additional insight. I'll pass this along to the team that is investigating the issue, and confirm with them whether this is intended.

I will update here when I have any new information to share.

Regards,
Mike, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@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 "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.

Igor Schut

unread,
May 7, 2019, 8:22:44 AM5/7/19
to AdWords API and Google Ads API Forum
We started to see this same behavior at the end of last week, more these last few days.

We use the Google AdWords API Java client library. We had no changes in our software.
The issues are random, sometimes they fail and sometimes they succeed.

Last time we saw this issue was yesterday. Today everything seems to be back to normal.

Best,
Igor

cv

unread,
May 7, 2019, 9:36:14 AM5/7/19
to AdWords API and Google Ads API Forum
Upvote for this bug from my end also.

I am seeing issue from late last week on Google Ads PHP Lib.

Upto last week I am able to run the same cose successfully. I have not chnaged single word to very same code since then.

Further to this, I have investigated and found that issue is coming on this scenario.

I have a refresh token for MCC account, under this MCC account I can get the 20 more accounts(MCC and Normal account) through ListAccessibleCustomers service.

When I check one by one accounts that I got from ListAccessibleCustomers, I can find Unauthenticated error for few of the above 20 accounts. Since I have access to Main MCC account I should able to get data for all of the account same MCC. Isn't it?

while using $customer = $customerServiceClient->getCustomer($resourceName);

I am using same code as I shared to help other developers.

Please help how I can identify that I have access to MCC account there or not?


Thanks,

Manuel Spierenburg

unread,
May 8, 2019, 5:43:43 AM5/8/19
to AdWords API and Google Ads API Forum
We found out that these errors are caused by accounts which are not really used anymore. 
Currently we blacklist those accounts.
The accounts are not set as inactive but not used anymore.

Still strange that these cause this errors.

googleadsapi...@google.com

unread,
May 8, 2019, 10:22:43 AM5/8/19
to mspier...@bol.com, AdWords API and Google Ads API Forum
Hello,

We have determined that these errors occur when you try to act against a disabled account. You cannot act on disabled accounts using the API, so these errors do indicate that you should be using a different account. However, the error message is a bit too generic so we are investigating the possibility of returning a more descriptive error message for this case in the future.

Thanks everyone for your patience while we investigated.

Regards,
Mike, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@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 "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.

Igor Schut

unread,
May 9, 2019, 2:17:47 AM5/9/19
to AdWords API and Google Ads API Forum
Our accounts are not disabled and yet we have these errors "internal_failure" as response from the OAuth java client library.

Again, random. So most of the time we don't see these but sometimes they pop up.

Best,
Igor

cv

unread,
May 9, 2019, 5:28:12 AM5/9/19
to AdWords API and Google Ads API Forum
Hello Mike,

Can we identify the Account is Disable or active from ListAccessibleCustomers service. It is not giving any other details then resource names.
So If anyone want to list All Accounts under the MCC account it is difficult to avoid error.

Please let us know way how I can differentiate valid account and invalid account.

As I mentioned above I was using first $customer = $customerServiceClient->getCustomer($resourceName); and getting error.
Either API only needs to return valid account from ListAccessibleCustomers service or need to give us more details to identify account.

Thanks,

googleadsapi...@google.com

unread,
May 9, 2019, 8:42:40 AM5/9/19
to chirag....@gmail.com, AdWords API and Google Ads API Forum
Hello,

I believe we already have an active feature request for some way to tell whether or not an account is currently disabled, but I will double check and file one if it's missing. I agree that this is critical to proper account management use cases.

Regards,
Mike, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

cv

unread,
May 11, 2019, 1:18:09 AM5/11/19
to AdWords API and Google Ads API Forum
Hello Mike,

I have account access under my MCC but still getting this UNAUTHENTICATED error.
Also I am not able to cache those error under APIException, it throw error and API request stops there.

Thanks,

cv

unread,
May 13, 2019, 5:05:09 AM5/13/19
to AdWords API and Google Ads API Forum
Any update here?

Seems like error handling also not escaping those errors.

Please help!! to get running getCustomer service.

Thanks,

googleadsapi...@google.com

unread,
May 13, 2019, 12:32:45 PM5/13/19
to chirag....@gmail.com, AdWords API and Google Ads API Forum
Hello,

This issue is because you are trying to act on a disabled account. If you are getting this type of error in any other context, please create a new forum post so that someone can help you as quickly as possible, and make sure you include all relevant details of what you've tried and exactly what error you're seeing.

Regards,
Mike, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Reply all
Reply to author
Forward
0 new messages