Google Ads API: Cannot create a sub-account , USER_PERMISSION_DENIED

44 views
Skip to first unread message

V Kuznetsov

unread,
Apr 9, 2020, 4:18:49 PM4/9/20
to AdWords API and Google Ads API Forum
Hello,

I am trying to create a sub-account on behalf of the MCC manager. I use example from the documentation (https://developers.google.com/google-ads/api/docs/account-management/create-account)

When I authorize as the MCC manager (447-9838-XXX) I get this error:
---------------BEGIN API CALL---------------

Request
-------

Method Name: /google.ads.googleads.v3.services.CustomerService/CreateCustomerClient
Headers: {
  "x-goog-api-client": "gl-dotnet/4.0.30319 gccl/2.8.0 gapic/2.8.0 gax/2.10.0 grpc/1.22.1",
  "developer-token": "REDACTED",
  "login-customer-id": "4479838XXX",
  "x-goog-request-params": "customer_id=4479838XXX"
}

{ "customerId": "4479838XXX", "customerClient": { "descriptiveName": "Test Account created with CustomerService on '2020-04-09 1:08:32 PM'", "currencyCode": "CAD", "timeZone": "America/Los_Angeles", "hasPartnersBadge": false, "testAccount": true } }

Response
--------
Headers: {
  "request-id": "Ldl-lXKIwoWCPF9SUd2y0A",
  "date": "Thu, 09 Apr 2020 20:08:33 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",
  "google.ads.googleads.v3.errors.googleadsfailure-bin": "Co0CCgJIAhKGAlVzZXIgZG9lc24ndCBoYXZlIHBlcm1pc3Npb24gdG8gYWNjZXNzIGN1c3RvbWVyLiBOb3RlOiBJZiB5b3UncmUgYWNjZXNzaW5nIGEgY2xpZW50IGN1c3RvbWVyLCB0aGUgbWFuYWdlcidzIGN1c3RvbWVyIGlkIG11c3QgYmUgc2V0IGluIHRoZSAnbG9naW4tY3VzdG9tZXItaWQnIGhlYWRlci4gU2VlIGh0dHBzOi8vZGV2ZWxvcGVycy5nb29nbGUuY29tL2dvb2dsZS1hZHMvYXBpL2RvY3MvY29uY2VwdHMvY2FsbC1zdHJ1Y3R1cmUjbG9naW4tY3VzdG9tZXItaWQ=",
  "grpc-status-details-bin": "CAcSI1RoZSBjYWxsZXIgZG9lcyBub3QgaGF2ZSBwZXJtaXNzaW9uGtgCCkN0eXBlLmdvb2dsZWFwaXMuY29tL2dvb2dsZS5hZHMuZ29vZ2xlYWRzLnYzLmVycm9ycy5Hb29nbGVBZHNGYWlsdXJlEpACCo0CCgJIAhKGAlVzZXIgZG9lc24ndCBoYXZlIHBlcm1pc3Npb24gdG8gYWNjZXNzIGN1c3RvbWVyLiBOb3RlOiBJZiB5b3UncmUgYWNjZXNzaW5nIGEgY2xpZW50IGN1c3RvbWVyLCB0aGUgbWFuYWdlcidzIGN1c3RvbWVyIGlkIG11c3QgYmUgc2V0IGluIHRoZSAnbG9naW4tY3VzdG9tZXItaWQnIGhlYWRlci4gU2VlIGh0dHBzOi8vZGV2ZWxvcGVycy5nb29nbGUuY29tL2dvb2dsZS1hZHMvYXBpL2RvY3MvY29uY2VwdHMvY2FsbC1zdHJ1Y3R1cmUjbG9naW4tY3VzdG9tZXItaWQ="
}

Fault: {
  "StatusCode": 7,
  "Details": "The caller does not have permission",
  "RequestId": "Ldl-lXKIwoWCPF9SUd2y0A",
  "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"
      }
    ]
  }
}
----------------END API CALL----------------

This is unexpected, since the login-customer-id is clearly set. This manager user can create sub-accounts in the MCC admin panel. But via the API it fails.

Please help to solve this problem.

Thanks,
Vlad.

Google Ads API Forum Advisor Prod

unread,
Apr 9, 2020, 5:04:18 PM4/9/20
to vla...@gmail.com, adwor...@googlegroups.com
Hi Vlad,

In order for me to further investigate, can you please provide the unmasked client ID as well as the email address used to authenticate the API call? Ensure you "Reply privately to author" when providing this information.

Thanks,
Danica Calusin, Google Ads API Team

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