Google Ads Api

89 views
Skip to first unread message

arief surya

unread,
Jul 13, 2022, 5:27:25 AM7/13/22
to Google Ads API and AdWords API Forum
.Net nuget version:
Google.Ads.Common: 9.5.1
using Google.Ads.GoogleAds.Lib
using Google.Ads.GoogleAds.V11.Services;

I have problem with this error, with this case:
I had a manager account 7234012969
Then I query to get customer 1426102797, using manager account
https://developers.google.com/google-ads/api/fields/v11/customer_query_builder

GoogleAdsConfig:
DeveloperToken: ...UQ
OAuth2ClientId: ...uefl.apps.googleusercontent.com
OAuth2ClientSecret: ...Zc
OAuth2RefreshYoken: ...HLM
LoginCustomerId: 1426102797

And I get this result error: 
Message: 
"Status(StatusCode=\"PermissionDenied\", Detail=\"The caller does not have permission\",
 DebugException=\"Grpc.Core.Internal.CoreErrorDetailException: {\"created\":\"@1657701812.719000000\",
 \"description\":\"Error received from peer ipv4:74.125.24.95:443\",\"file\":\"..\\..\\..\\src\\core\\lib\\surface\\call.cc\",
 \"file_line\":1070,\"grpc_message\":\"The caller does not have permission\",\"grpc_status\":7}\")"


Failure:
{{ "errors": [ { "errorCode": { "authorizationError": "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" } ], "requestId": "Exhkg7VeY9Ojyiaf_fm-xA" }}


Google Ads API Forum Advisor

unread,
Jul 13, 2022, 9:01:01 AM7/13/22
to cong...@gmail.com, adwor...@googlegroups.com

Hi Arief,

Thank you for raising this concern to the Google Ads Forum.

With regard to your concern USER_PERMISSION_DENIED error. The common cause of this is when authenticating as a user with access to a manager account but not specifying login-customer-id in the request. Could you please ensure that the user / email address you used to generate the credentials indeed has access to the account in your request. If the user / email address has access or is associated with the MCC / manager account, you will need to specify the MCC / manager account's ID without hyphens (-) as the value of the login-customer-id field.

If the issue still persists, you can provide the email address used to generate the OAuth2 credentials and complete request and response logs, with the request-id?  if you haven't enabled the logging of the API transactions for the specific client library that you are using, then please refer to the specific guide here, so our team can check it. You can provide it via the Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.


Best,

Google Logo
Anthony Cyril
Google Ads API Team
 


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