RE: google ads - permission danied

2023-06-16 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi Emanuele,

Thank you for reaching out to us.

Kindly note that "USER_PERMISSION_DENIED" <> error means that a user doesn't 
have permission to access a customer and you’re accessing a client customer 
using 'login-customer-id’ in the request.

To address the above 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 with the MCC / manager account, you will need to specify the said 
MCC / manager account ID as the value of the login-customer-id 
 
field.

If the issue still persists, you may provide us with the user account / email 
address that you used to generate API access or refresh tokens and the complete 
API logs (request and response with request-id) generated on your end, so that 
we could further check this and provide precise guidance accordingly.

request : 
https://developers.google.com/google-ads/api/docs/concepts/field-service#request
response: 
https://developers.google.com/google-ads/api/docs/concepts/field-service#response
request-id : 
https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id

Note that logs can be requested or provided to the developer handling the 
Google Ads API transactions when logging of the API requests has been enabled. 
You may check here and click your client library for the specific guideline to 
enable it.

here: 
https://developers.google.com/google-ads/api/docs/best-practices/logging#client_library_logging

For REST interface requests, you can enable logging via the curl command by 
using the -i flag. This will cause the tool to include the HTTP response 
headers in the output.

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 googleadsapi-supp...@google.com alias instead.

This message is in relation to case "ref:_00D1U1174p._5004Q2mCXAJ:ref"

Thanks,

Google Ads API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/UwDlb0RWC95600G3G-ySynTlGbaSPwxFyqdg%40sfdc.net.


Google Ads - PERMISSION DANIED

2023-06-13 Thread Emanuele Lucchese

Hello,

I am experiencing an issue while running an application that utilizes the 
Google Ads API to create a campaign budget. I am receiving the error 
message "The caller does not have permission." I would like to request your 
assistance in resolving this issue.


Code:
$budget = new CampaignBudget([ 'name' => 'Interplanetary Cruise Budget #'.
date('c'), 'delivery_method' => BudgetDeliveryMethod::STANDARD, 
'amount_micros' => 50 ]); // Creates a campaign budget operation. 
$campaignBudgetOperation = new CampaignBudgetOperation(); 
$campaignBudgetOperation->setCreate($budget); // Issues a mutate request. 
$campaignBudgetServiceClient = $googleAdsClient->
getCampaignBudgetServiceClient(); $response = $campaignBudgetServiceClient->
mutateCampaignBudgets($customerId, [$campaignBudgetOperation]); /** @var 
CampaignBudget $addedBudget */ $addedBudget = $response->getResults()[0]; 
printf("Added budget named '%s'%s", $addedBudget->getResourceName(), 
PHP_EOL);

I have verified that the Google Ads account has the appropriate permissions 
to access the API and create campaign budgets. I have also checked the 
authentication credentials and correctly set the customerId as a string.

However, despite these checks, I continue to receive the "The caller does 
not have permission" error. I would like to request your support in 
identifying the cause of the problem and finding a solution.

Thank you in advance for any assistance you can provide.

Best regards, [Your Name]

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/f6ef3d6d-d44f-4df7-902b-9d9fd8a79aaan%40googlegroups.com.