Can't access REST but gRPC works

91 views
Skip to first unread message

Errors4l

unread,
Jan 5, 2023, 4:16:07 AM1/5/23
to Google Ads API and AdWords API Forum
I'll leave this short because my detailed posts are getting deleted yet I'm not receiving any kind of message as to why.

I'm successfully authorizing the Google Ads scope with the grant type authorization_code. Refreshing with grant type refresh_token also works.

When I call the v12 customers:listAccessibleCustomers REST endpoint with the required headers (including Authorization: Bearer ACCESS_TOKEN) I receive a 401 UNAUTHENTICATED response and a description indicating the token is not present in the request.

The refresh token from the same grant works fine when used in a client library using the same client id, client secret, developer token and login customer id.

Google Ads API Forum Advisor

unread,
Jan 5, 2023, 11:16:35 AM1/5/23
to cas.van....@gmail.com, adwor...@googlegroups.com
Hi, 

Thank you for raising this concern to the Google Ads API Forum. 

It seems that you encountered the AUTHENTICATION_ERROR, I would suggest checking your API configuration by referring to this guide especially the authentication part as the issue is occurring when there is an issue related to this. 

In the event that the error still persists, you may please provide the complete logs within the format of the  (request and response with request-id) that generated on your end.

If you haven't yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link.


For security purposes, you can provide it via the Reply privately to author option. If this option is not available, then send it instead on this email address googleadsapi-support@google.com.

Best regards,
Google Logo
Jinky
Google Ads API Team
 


ref:_00D1U1174p._5004Q2hZut4:ref

Errors4l

unread,
Jan 6, 2023, 9:42:12 AM1/6/23
to Google Ads API and AdWords API Forum
Through a private reply we have established that the error message "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential." can also indicate the developer token is incorrect. After double checking all credentials (including our typo'd developer token) the REST API works as expected.

Thanks for the help.

On Thursday, 5 January 2023 at 17:16:35 UTC+1 adsapi wrote:
Hi, 

Thank you for raising this concern to the Google Ads API Forum. 

It seems that you encountered the AUTHENTICATION_ERROR, I would suggest checking your API configuration by referring to this guide especially the authentication part as the issue is occurring when there is an issue related to this. 

In the event that the error still persists, you may please provide the complete logs within the format of the  (request and response with request-id) that generated on your end.

If you haven't yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link.


For security purposes, you can provide it via the Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.
Reply all
Reply to author
Forward
0 new messages