GoogleAds V8 REST works but grpc fails with "PermissionDenied"

347 views
Skip to first unread message

jlw2...@gmail.com

unread,
Aug 4, 2021, 2:24:05 PM8/4/21
to AdWords API and Google Ads API Forum
I'm having trouble getting the GoogleAds API c# library to work but the REST endpoints are working just fine.

I have one MMC account which has access to one client account.

  o  LoginCustomerId: 2165426251 (MMC Account)
  o  LinkedCustomerId: 1460046398 (client Ads account)

When I use the ListAccessibleCustomers() method from Services.V8.CustomerService, the response indicates the API user has access to:

  "customers/1460046398, customers/2165426251"

Any library method I've tried using Services.V8.GoogleAdsService, however, fails with the following message:

Status(StatusCode="PermissionDenied", Detail="The caller does not have permission", DebugException="Grpc.Core.Internal.CoreErrorDetailException: {"created":"@1628100271.325000000","description":"Error received from peer ipv4:172.217.8.138:443","file":"..\..\..\src\core\lib\surface\call.cc","file_line":1068,"grpc_message":"The caller does not have permission","grpc_status":7}")

A recent request id is:
   Request ID: mIixcjIUMVtxWOm_Ccntxw 

I am able to run search queries against this account using the SAME Oauth credentials and the REST endpoint as follows:


HEADERS: 
         Authorization: "Bearer [redacted]"
 developer-token: "[redacted]"
 login-customer-id: "2165426251"

QUERY: SELECT ad_group.ad_rotation_mode, ad_group.id, ad_group.name, ad_group.status, ad_group.type, campaign.id, campaign.name, metrics.impressions, metrics.clicks, metrics.cost_micros, metrics.conversions , segments.ad_network_type, segments.device, metrics.top_impression_percentage, metrics.absolute_top_impression_percentage FROM ad_group WHERE ad_group.status != 'REMOVED' AND segments.date >= '2021-08-03' AND segments.date < '2021-08-04' 

What magic am I missing that's required to make the grpc GoogleAdsService library methods work?

Message has been deleted

Google Ads API Forum Advisor

unread,
Aug 5, 2021, 11:54:57 PM8/5/21
to jlw2...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to our API support team.

However, I had to delete your follow up post as it contained details of your logs. When sharing logs and other account information, we recommend that you provide those instead when requested, via the Reply privately to author option, or directly to our googleadsa...@google.com alias instead.

Moving forward, I noticed that you specified the linked-customer-id in your request. Could you confirm that it was included there for the purpose described in the documentation?

In addition, could you also provide the user / email address you used to generate your OAuth2 credentials with? For this information, you may send this privately via the options I mentioned above.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q2HLqTJ:ref

jlw2...@gmail.com

unread,
Aug 12, 2021, 10:11:12 AM8/12/21
to AdWords API and Google Ads API Forum
Peter -

  We replied privately almost a week ago.  Do you have any updates on what may be wrong with our account or credentials?

The V8 library continues to fail for us though REST works.  We'd much rather NOT have to build out all the model classes by hand.

Thank you - Jackson

Google Ads API Forum Advisor

unread,
Aug 13, 2021, 2:09:31 AM8/13/21
to jlw2...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for your follow up. You may check your private inbox as well since my colleague Ernie responded on August 9. Below are the contents of his response :

"Hi,

Thank you for providing further details.

Yes, we are assuring that we have copies of all the concern raised to our team via our email alias and forum.

Moving forward, since you are just generating a report, then I believe that it is not required to set value to linked-customer-id. You may refer to this document to know the more information about the said field.

As for the USER_PERMISSION_DENIED error, I will request to compare the credential that you've set in the REST API and in the properties file of your dotnet client library. If not the same, then I would suggest to copy the credential from the REST API to the the dotnet client library.

If the same but the error is still occurring, then provide the complete request and response logs with request ID generated for REST API to further investigate.
"

As mentioned by Ernie, you may provide the logs should the issues persist.

Google Ads API Forum Advisor

unread,
Aug 17, 2021, 2:52:13 PM8/17/21
to jlw2...@gmail.com, adwor...@googlegroups.com
Hi Jackson,

If you haven't been receiving our messages, please send an email to googleadsa...@google.com, and we can continue the thread there. Please link this forum thread in your email.

Thanks,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


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