UNAUTHENTICATED for Google Ads API

736 views
Skip to first unread message

Troy Banks

unread,
Sep 1, 2023, 3:45:47 PM9/1/23
to Google Ads API and AdWords API Forum
Hi, starting over the past day or so, we've started getting intermittent errors from the Google Ads API when trying to add users (operations) using an OfflineUserDataJobServiceClient from the Java SDK. Nothing has changed in our codebase nor with our authentication as far as I'm aware. I don't see an outage or anything of that sort being reported on the status dashboard. The errors don't happen for every request, but it happens enough that it prevents us from completely uploading the intended user list size of 1M+. It's my understanding correct that the Java SDK should refreshing the credentials when necessary, so I'm confused why we'd get this error all of a sudden. Thanks for any help 

The request details from logs:

MethodName: google.ads.googleads.v13.services.OfflineUserDataJobService/AddOfflineUserDataJobOperations
Endpoint: googleads.googleapis.com:443
Headers: {developer-token=REDACTED, login-customer-id=REDACTED, x-goog-api-client=gl-java/11.0.19 gccl/25.0.0 gapic/25.0.0 gax/2.22.0 grpc/1.52.1 pb/3.21.12}

And the error we've been seeing 

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

Troy Banks

unread,
Sep 1, 2023, 3:48:52 PM9/1/23
to Google Ads API and AdWords API Forum
And for what it's worth, I have a request Id for one of the failed requests if that's necessary for troubleshooting

sheryan...@braze.com

unread,
Sep 1, 2023, 4:00:09 PM9/1/23
to Google Ads API and AdWords API Forum
Hi! Seeing the same issue using the ruby client. Started yesterday around 12 PM EST. Also happening in a transient manner. I have also sent an email to support. 

Ate Fokkinga

unread,
Sep 1, 2023, 4:29:40 PM9/1/23
to Google Ads API and AdWords API Forum
We're seeing the same errors across roughly 5% of our calls relating to offlineUserDataJobOperations. We're still running the v12 version of the API through Node.js.

This is also reported in the cloud console where our api is registered. It started on the 31st

It's happening for the endpoints:
/AddOfflineUserDataJobOperations
/CreateOfflineUserDataJob
/RunOfflineUserDataJob

We also made no changes to our systems or code.

Google Ads API Forum Advisor

unread,
Sep 1, 2023, 7:00:30 PM9/1/23
to johntavio...@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for raising this concern to our team.

Since you're only encountering the error intermittently, can you please provide the complete request and response logs with request-id where the error was encountered so we can further investigate? These would greatly help us in our investigation. You may send these to us via Reply privately to author option.

Reference links:
request - https://developers.google.com/google-ads/api/docs/concepts/field-service#request
response - https://developers.google.com/google-ads/api/docs/concepts/field-service#response
request-id - https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id

This message is in relation to case "ref:_00D1U1174p._5004Q2oAGNX:ref"

Thanks,
 
Google Logo Google Ads API Team

 



Johntavious Barkley

unread,
Sep 1, 2023, 8:35:10 PM9/1/23
to Google Ads API and AdWords API Forum
I sent a private reply, thanks

Google Ads API Forum Advisor

unread,
Sep 4, 2023, 6:12:02 AM9/4/23
to johntavio...@gmail.com, adwor...@googlegroups.com

Hi,

 

Thanks for getting back with us.

 

With regards to your concern, I can see that you are using the v13 in your requests. Can you also retry your request using the latest version (v14) and check if the error persists? This is so we could narrow down the possible cause of this error. We highly recommend migrating to a newer version as soon as possible to ensure your API access is unaffected, since v13 has already been deprecated and issuing requests to a deprecated (or sunset) version of the API may incur the risk of losing access to it. 

 

If the error persists after using the v14, please note that in Google Ads API perspective, we need the complete logs to be able to see if there’s an error thrown on your side and further investigate. With that being said, can you provide the complete request and response logs with request ID and request header generated as shown in the respective links with the v14? 

 

Links included in this email:

Ate Fokkinga

unread,
Sep 4, 2023, 8:35:18 AM9/4/23
to Google Ads API and AdWords API Forum
Hi,

For us, the error has dissappeared after 5pm UTC September 3rd. We did not change anything when the error started and not when the error ended. It would be good to have an explanation from Google on what happened and how it was resolved, since it had a pretty big impact on our customers and we've also spent a large number of hours on our end making sure it wasn't something in our code or infrastructure. You shouldnt need the request/response logs for that, and you should be able to see these 401's in the internal logging, since I could clearly see them in my own Ads API metrics, see screenshot.

Best

googleads_401.png

Paul

unread,
Sep 4, 2023, 10:00:45 AM9/4/23
to Google Ads API and AdWords API Forum
We also observed this issue on the google.ads.googleads.v14.services.KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics method, with similar disruption end our end. Issues started on Sep 1, became more severe on Sep 2 and Sep 3, and finally disappeared again on Sep 4, without any change on our side.

Google Ads API Forum Advisor

unread,
Sep 4, 2023, 11:58:06 AM9/4/23
to adwor...@googlegroups.com

Hi,

Thanks for reaching out to the Google Ads API Team. I hope you are doing well today.

In relation to your concern, could you please confirm also that you are encountering the same issue, even using the Google Ads API v14? Could you also please provide the complete logs (request and response logs with request ID and request header generated as shown in the respective links)? This will help us to further investigate and narrow down the main issue, then raise this to the wider team.



Links included in this email:


    Have a great day.
     

    Johntavious Barkley

    unread,
    Sep 4, 2023, 1:24:00 PM9/4/23
    to Google Ads API and AdWords API Forum
    I won't be able to quickly change the system to use the v14 apis as that requires a production code change, but I'll queue that change up for our next production release. It looks like the error has subsided for us as well over the past 24-ish hours. But as I understand it now, if the error does occur again I'll make sure that we're on v14 (or whatever's current at the time)  to confirm if the error happens with that setup

    Google Ads API Forum Advisor

    unread,
    Sep 4, 2023, 4:09:57 PM9/4/23
    to johntavio...@gmail.com, adwor...@googlegroups.com

    Hi all,

    Thank you for your reply.

    I’ve news to share with you. The issue should be fixed. Could you retry your request again, and see if it works without said error on your end? Should it persist, please provide the latest request-ids that have failed so that we can provide it for further investigations. 

    Reply all
    Reply to author
    Forward
    0 new messages