Permission Denied Error

33 views
Skip to first unread message

Dan Brady

unread,
Nov 7, 2022, 4:38:37 AM11/7/22
to Google Ads API and AdWords API Forum
I'm trying to execute a request to get some metrics data from the Ads API on behalf of a client.

If I construct a POST request in postman and post to https://googleads.googleapis.com/v12/customers/xxx/googleAds:searchStream, the response is what would be expected.

However when I execute using the dotNet client library, specifying the same paramaters as above, I get the following error:

"Message": "Status(StatusCode=\"PermissionDenied\", Detail=\"The caller does not have permission\")"

Is there some extra level of authorisation the client needs to provide our manager account in order to use the client libraries as opposed to a straight http POST request?

Thanks for any help on this one,
Dan

Google Ads API Forum Advisor

unread,
Nov 7, 2022, 7:34:00 AM11/7/22
to dan...@fusionware.com.au, adwor...@googlegroups.com
Hi Dan,

Thank you for posting your concern. Allow me to provide support to your concern.

To answer your question, I would suggest referring to this document as it explains how to authorize Google Ads API request. Also, the error that you mentioned occurs when you're not specifying the customer ID of the Google Ads Account, where your login user account / email address (that you've used to generate Oauth2 credential) has direct access, to the login-customer-id. If your login user account / email address has access to the MCC account, then its customer id must be set in the login-customer-id header.
 
Furthermore, I would also suggest referring to this document as it presents details specific to REST and explains what you need to know to call the REST interface directly.

Regards,
Google Logo
Ernie John
Google Ads API Team
 


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