Error to Migrating from the AdWords API to the Google Ads API (PHP)

26 views
Skip to first unread message

Miquel (Grupo Esneca Formación)

unread,
Mar 2, 2022, 11:12:32 AM3/2/22
to Google Ads API and AdWords API Forum
Error in adwords api trying to get reports from our ad accounts, I don't know why it gives me this error, I'm using the Reporting  example GetHotelAdsPerformance.php I would like to know what to do Thanks!

Error: 
Request with ID 'CBi7LtZ-5NJ-VM3UQm2WSg' has failed. Google Ads failure details: authorization_error: 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

Google Ads API Forum Advisor

unread,
Mar 3, 2022, 9:27:44 AM3/3/22
to desarro...@grupoesneca.com, adwor...@googlegroups.com
Hi Miquel,

Thank you for reaching out to the Google Ads API support team.

With regards to your concern, you’ve encountered ‘USER_PERMISSION_DENIED' error. The ‘USER_PERMISSION_DENIED’ usually occurs due to incorrectly setting the 'login-customer-id’ in the request or not specifying login-customer-id in the request. Note that when a user doesn't have permission to access a customer and you’re accessing a client customer then the manager's customer ID must be set in the 'login-customer-id’ in the header request.

To resolve this, you will need to ensure that your OAuth2 credentials were generated while logged in as the user / email address that has access to the customer ID in your request. Also, if the said user / email address is one that has access to the MCC / manager of the customer account, then you may specify the MCC / manager account's ID as the login-customer-id.


To investigate the issue further, could you please provide us with the complete logs (request and response with request-id) ? Please reply privately author option.

Thanks,
Google Logo
Nirmita
Google Ads API Team
 


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