Error API Requisition

49 views
Skip to first unread message

Eduardo Moraes Rigo

unread,
Oct 16, 2023, 3:15:21 PM10/16/23
to Google Ads API and AdWords API Forum
{
    "message": "The caller does not have permission",
    "code": 7,
    "status": "PERMISSION_DENIED",
    "details": [
        {
            "@type": "type.googleapis.com\/google.ads.googleads.v14.errors.GoogleAdsFailure",
            "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": "1MlYmEkhECnzOB2hrsc7Kw"
        }
    ]
}

The error occurs when trying to make the API call

My main doubt is:

We have the credentials and we get the MCC, in this case, the MCC would be the manager's customer id? And if so, where should I insert it in the code?

Thank you very much!

Google Ads API Forum Advisor

unread,
Oct 17, 2023, 9:43:37 AM10/17/23
to eduard...@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 getting a USER_PERMISSION_DENIED error. Yes, MCC is the manager account ID. Specify the login-customer-id as the manager account ID without hyphens (-). Client libraries have built in support for this. Retry the request, if still the issue persists, please provide us the latest complete API logs (request and response with request-id and request header) generated at your end to assist you further.

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, .Net, PHP, Python, Ruby 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.

You can send the details via Reply privately to the author option, or direct private reply to this email.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02pSAqm:ref"

Thanks,
 
Google Logo Google Ads API Team

 

Reply all
Reply to author
Forward
0 new messages