API requests failing with Permission Issue

72 views
Skip to first unread message

Vamshi Bommana

unread,
Dec 17, 2022, 6:53:04 PM12/17/22
to Google Ads API and AdWords API Forum

We started seeing API failures starting 2022-12-16 7:00 PM PST, this is happening across all google ads end points. 
This is impacting all our reporting without having correct spend and conversions
below is the error we are receiving 


{logging_interceptor.py:271} WARNING - Request made: ClientCustomerId: 9826732845, Host: googleads.googleapis.com, Method: /google.ads.googleads.v11.services.GoogleAdsService/SearchStream, RequestId: lsjLi-CYpqS0PJsoA9Lr7g, IsFault: True, FaultMessage: 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
*** google.ads.googleads.errors.GoogleAdsException: (<_SingleThreadedRendezvous of RPC that terminated with:
      status = StatusCode.PERMISSION_DENIED
      details = "The caller does not have permission"
      debug_error_string = "{"created":"@1671319331.838439000","description":"Error received from peer ipv6:[2607:f8b0:4007:815::200a]:443","file":"src/core/lib/surface/call.cc","file_line":967,"grpc_message":"The caller does not have permission","grpc_status":7}"
>, <_SingleThreadedRendezvous of RPC that terminated with:
      status = StatusCode.PERMISSION_DENIED
      details = "The caller does not have permission"
      debug_error_string = "{"created":"@1671319331.838439000","description":"Error received from peer ipv6:[2607:f8b0:4007:815::200a]:443","file":"src/core/lib/surface/call.cc","file_line":967,"grpc_message":"The caller does not have permission","grpc_status":7}"
>, 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: "lsjLi-CYpqS0PJsoA9Lr7g"
, 'lsjLi-CYpqS0PJsoA9Lr7g')
We are including manager customer_id  in the header as login-customer-id.

Google Ads API Forum Advisor

unread,
Dec 19, 2022, 12:05:12 AM12/19/22
to vbom...@techstyle.com, adwor...@googlegroups.com

Hi Vamshi, 

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

With regard to your concern of having an error, the USER_PERMISSION_DENIED error occurs when the OAuth2 credentials you are using were generated by a user or email address that does not have access to the account (customer_id) specified in your request. To resolve this kind of issue, you can manage user access by referring to this article

Please note that it may result from another reason and example of this is if you the said user or 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 without hyphens (-) as the value in the request header.

If error still persists even following the above guide, then you may provide the email address used to generate OAuth credentials, and complete request and response logs with request ID and request header 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

Please be informed that when replying with sensitive information send it privately to the author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Have a great day.

Regards,

Google Logo
Marjorie
Google Ads API Team
 


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