"message": "The caller does not have permission",
"code": 7,
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "google.ads.googleads.v8.errors.googleadsfailure-bin",
"data": "<Unknown Binary Data>"
},
{
"@type": "grpc-status-details-bin",
"data": "<Unknown Binary Data>"
},
{
"@type": "request-id",
"data": "2mlrxVNlSUwrj7F9HjOwPg"
}
]
}
Someone have an idea what to do ?
Hi,
Thanks for reaching out to us. The PERMISSION_DENIED error usually occurs when there is no link between the manager account authenticated in the request and the client account specified in the headers. As you are using the Google Ads API you need to include the login-customer-id in the header as mentioned in this blog post. Please make sure you use the correct login-customer-id that you used to generate the OAuth2 credentials.
To elaborate more on customer ID, if your access to the customer account is through a manager account (OAuth2 credentials created using a user that has access to your manager account), this header is required and must be set to the customer ID of the manager account. Since you’re using the PHP client library, then you will then need to specify this in your google_ads_php.ini file, where your other credentials are placed. Let us know if you have any further questions.
Regards,
|
||||||
Hi,
Thanks for the clarification.
In order to avoid the Permission_denied error, you will need to 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 to the MCC / manager account, you will need to specify the said MCC / manager account's ID as the value of the login-customer-id field.
If the issue persists, could you please share the following information so that our team can take closer look?
If you haven’t enabled logging yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. PHP) > Logging documentation, which you can access from this link.
You may then send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.
Regards,