Error not search only on specific manager account

28 views
Skip to first unread message

박주호

unread,
Mar 21, 2022, 3:23:13 AM3/21/22
to Google Ads API and AdWords API Forum
After generating oauth client id and password in gcp
I authenticated the google ads and sent a search request, but there was an error as follows.
But strangely, certain mannager accounts do not cause errors, but some mannerger accounts cause errors.
(Both removed and requested hyphens (-)
What's the problem?
The error below is a manger account that removes the hyphen (-) and transfers the error that occurred when the search request was made.

(<_SingleThreadedRendezvous of RPC that terminated with:
        status = StatusCode.PERMISSION_DENIED
        details = "The caller does not have permission"
        debug_error_string = "{"created":"@1647847100.582000000","description":"Error received from peer ipv4:216.58.220.138:443","file":"src/core/lib/surface/call.cc","file_line":1067,"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":"@1647847100.582000000","description":"Error received from peer ipv4:216.58.220.138:443","file":"src/core/lib/surface/call.cc","file_line":1067,"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: "OZ_-1GsLyYd7LZq3Th63uQ"
, 'OZ_-1GsLyYd7LZq3Th63uQ')

Google Ads API Forum Advisor

unread,
Mar 21, 2022, 6:57:09 AM3/21/22
to jhp...@artience.com, adwor...@googlegroups.com

Hi,
 

Thanks for reaching out to the Google Ads API Support team.
 

It seems you have encountered the USER_PERMISSION_DENIED and this occurs when authenticating as a user with access to a manager account but not specifying login-customer-id in the request. Specify the login-customer-id as the manager account ID without hyphens (-). Client libraries have built in support for this you can check this documentation guide for your references.
 

However, so that our team can better check on this, could you please provide the complete API logs (request and response with request-id)? 
 

You can provide it via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.
 

Regards,

Google Logo
Darwin
Google Ads API Team
 

 



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