Google ADS API Authrization, Permission ERROR

41 views
Skip to first unread message

Jian Hu

unread,
Mar 13, 2024, 8:46:18 AM3/13/24
to Google Ads API and AdWords API Forum
Hello,

I try to upgrade PHP library from V14 to V16, API call (query select) with V16 display this message:

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

But it works well with V14, I don't understand what's change auto-login in V16.

Do you have some documentation for this change ?

Thanks,

Jian

Google Ads API Forum Advisor

unread,
Mar 13, 2024, 11:31:12 AM3/13/24
to jia...@twenga.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 facing a USER_PERMISSION_DENIED error. This means the user doesn't have permission to access the customer. According to the documentation, if you're accessing the customer please specify the login-customer-id as the manager account ID without hyphens (-). Client libraries have built in support for this.

Also, kindly upgrade your 'google/gax' to the latest version by running 'composer update'. 

If still the issue persists, provide us with the complete API logs (request and response with request-id and request header) generated at your end to assist you further. If you haven't enabled logging yet, would request you to enable logging for the client library that you are using. You can refer to the guide PHP to enable logging at your end.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02rzuUy:ref" (ADR-00227113)

Thanks,
 
Google Logo Google Ads API Team


Message has been deleted

Google Ads API Forum Advisor

unread,
Mar 13, 2024, 4:46:31 PM3/13/24
to jia...@twenga.com, adwor...@googlegroups.com
Hi Jian,

Thank you for getting back to us.

You can include the login-customer-id in the google_ads_php.ini file. I would recommend you to check this guide on Make an API call for more information.
Reply all
Reply to author
Forward
0 new messages