Hi,
Thank you for contacting the Google Ads API support team.
Upon reviewing your concern, I understand that you are encountering a USER_PERMISSION_DENIED authorization error. This error indicates the user doesn't have permission to access the customer. In order to resolve this error, you need to ensure the following points:
- The email Id that you're using to generate OAuth credentials is added to your Google Ads account with 'Admin' or 'Standard' access to perform API operations. You can refer to the access level help center article for more information on access levels.
- If you're accessing the customer account, you need to specify the ‘login-customer-id’ as the manager account ID without hyphens (-). Client libraries have built in support for this. You can refer to the API documentation for more information.
Following the above provided points should resolve the USER_PERMISSION_DENIED error. If you are still facing any issues, then in order to investigate the issue further, kindly provide the following details to us:
- Google Ads customer Id used, login-customer-id provided (in case if you're accessing the customer account) and the email Id used to generate OAuth credentials.
- Note that this email ID should be present in your account with 'Admin' or 'Standard' access level.
- To check this from your end, I would suggest you to navigate to your Google Ads account > Admin > Access and Security > Users > Email ID with 'Admin' or 'Standard' access level should be present. I would recommend you to refer to this help center article 'Manage access to your Google Ads account' for more detailed information on how to add the access levels.
- Execute List Accessible Customers and provide us complete API request and response logs, you may also check this API documentation for more information.
- Complete API logs (request and response with request-id and request header) generated on your end for the provided error without redacting any information.
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.
