User doesn't have permission to access customer.

85 views
Skip to first unread message

Ahmet Enes DABANLIOGLU

unread,
Apr 26, 2020, 8:35:12 AM4/26/20
to AdWords API and Google Ads API Forum

When I look linked account, I seeing my test mcc account and everything look good. (admin permission etc.)

after that I tried add a campaign under this account with this code https://github.com/googleads/google-ads-php/blob/master/examples/BasicOperations/AddCampaigns.php

but I see this error.

===================================================

[2020-04-26T14:27:11.129454+02:00] google-ads.INFO: Request made: Host: "googleads.googleapis.com", Method: "/google.ads.googleads.v3.services.CustomerService/CreateCustomerClient", ClientCustomerId: 133855XXXX, RequestId: "FTeid-Bq26C7EkSVIV2dSw", IsFault: 0, FaultMessage: "None"  

Created a customer with resource name "customers/481193XXXX" under the manager account with customer ID 133855XXXX.

[2020-04-26T14:29:00.011704+02:00] google-ads.WARNING: Request made: Host: "googleads.googleapis.com", Method: "/google.ads.googleads.v3.services.CampaignBudgetService/MutateCampaignBudgets", ClientCustomerId: 481193XXXX, RequestId: "OmVm383tnrDYE0u-8LlzpA", IsFault: 1, FaultMessage: "["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#login-customer-id"]"  
[2020-04-26T14:29:00.015405+02:00] google-ads.NOTICE: Request
-------
Method Name: /google.ads.googleads.v3.services.CampaignBudgetService/MutateCampaignBudgets
Headers: {
    "x-goog-api-client": "gl-php\/7.4.4 gapic\/ gax\/1.3.0 grpc\/1.28.0",
    "x-goog-request-params": "customer_id=481193XXXX",
    "developer-token": "REDACTED"
}
Request: {"customerId":"481193XXXX","operations":[{"create":{"name":"Interplanetary Cruise Budget #5ea57e8b53734","amountMicros":"500000","deliveryMethod":"STANDARD"}}]}

Response
-------
Headers: {
    "request-id": "OmVm383tnrDYE0u-8LlzpA",
    "date": "Sun, 26 Apr 2020 12:28:58 GMT",
    "alt-svc": "quic=\":443\"; ma=2592000; v=\"46,43\",h3-Q050=\":443\"; ma=2592000,h3-Q049=\":443\"; ma=2592000,h3-Q048=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000"
}

Fault
-------
Status code: 7
Details: The caller does not have permission
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#login-customer-id"}]}  


Google Ads API Forum Advisor Prod

unread,
Apr 27, 2020, 10:48:19 AM4/27/20
to enesdab...@gmail.com, adwor...@googlegroups.com
Hi Ahmet,

Thank you for reaching out to us. Could you check that in the login-customer-id field has the manager's customer id? If it does, could you check that the manager account and the customer account are linked? If the login-customer-id field has the manager's customer id, and the customer account is linked under the manager account, could you check that your user with the client credentials that you're using to make the call is given the correct permissions to access this account? You can check if the user has access by logging into your account, then clicking "Tools and Settings" > "Setup" > "Account Access" and your user's email should be listed under the "Users" tab. Let me know if you have further questions.

Thank you,
Bryan, Google Ads API Team

ref:_00D1U1174p._5001UaSP06:ref

Ahmet Enes DABANLIOGLU

unread,
Apr 27, 2020, 11:54:33 AM4/27/20
to AdWords API and Google Ads API Forum
I set manager's customer id to login-customer-id. This fix my issue.

Thank you.
Reply all
Reply to author
Forward
0 new messages