Caller permission

34 views
Skip to first unread message

ofir sabag

unread,
Apr 24, 2024, 8:47:06 PM4/24/24
to Google Ads API and AdWords API Forum
I am trying to make a call to the ads api using the code piece
this.ServiceClient.SearchStream(search.CustomerId, search.Query, delegate (SearchGoogleAdsStreamResponse resp)
{
foreach (GoogleAdsRow googleAdsRow in resp.Results)
{
Console.WriteLine("Campaign with ID {0} and name '{1}' was found.",
googleAdsRow.Campaign.Id, googleAdsRow.Campaign.Name);
}
});

and I get an error message "the caller does not have permission" on it
I have a developer token with test access level 
I also have a valid client id client secret and a refresh token 
What is a possible solution for this error?

Google Ads API Forum Advisor

unread,
Apr 25, 2024, 5:21:33 AM4/25/24
to sabag...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

By reviewing your concern, I understand that you're facing a USER_PERMISSION_DENIED error. This means the user doesn't have permission to access the customer. According to the documentation, if you're accessing the customer please specify the login-customer-id as the manager account ID without hyphens (-). Client libraries have built in support for this. Also, I would kindly request you to check if you have a correct access level to the Google Ads account that you are accessing and share the screenshot with us for further investigation. 

In order to debug your issue further, kindly provide us with the complete API logs (request and response logs with request-id and request header) generated at your end. 

 If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java.NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tPJ9x:ref" (ADR-00232555)

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages