Auth issue

25 views
Skip to first unread message

Dan Willoughby

unread,
Dec 2, 2022, 9:04:46 AM12/2/22
to Google Ads API and AdWords API Forum
Hi,

I am getting the below error response:

errors {

  error_code {

    authorization_error: USER_PERMISSION_DENIED

  }

  message: "User doesn\'t have permission to access customer. Note: If you\'re accessing a client customer, the manager\'s customer id must be set in the \'login-customer-id\' header. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid"

}

request_id: "mQoaR4UejQk7Wn8kh3skMQ"

, 'mQoaR4UejQk7Wn8kh3skMQ')


This seems to be happening randomly, even though the error indicates it is not random. I retry this manually on the server (same arguments passed) and it returns as expected. But overnight we randomly get errors like the above. 

Google Ads API Forum Advisor

unread,
Dec 5, 2022, 12:39:15 AM12/5/22
to danwill...@gmail.com, adwor...@googlegroups.com
Hi Dan,

Thank you for reaching us out. I am Sherwin from Google Ads API support team. I hope that you are doing well today.

The USER_PERMISSION_DENIED error occurs when the OAuth2 credentials you are using were generated by a user / email address that does not have access to the account (customer_id) specified in your request. You can manage user access by referring to this article.

Another reason is that, if you the said user / email address that was used is associated to the MCC / manager account of the customer_id in your request, you will need to specify that MCC / manager account's ID as the login-customer-id in the request header.

If the error message persists after you've done these suggestions, please come back to us with a complete request and response logs with request ID and request header generated on your end? You can provide it via Reply privately to the author option. If this option is not available, then send it instead on this email address googleadsa...@google.com. If you haven't enabled the logging 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.

Kind regards,
Google Logo
Sherwin Vincent
Google Ads API Team
 


ref:_00D1U1174p._5004Q2ghsvd:ref
Reply all
Reply to author
Forward
0 new messages