permission denied error

48 views
Skip to first unread message

Ajay.R

unread,
Jun 9, 2022, 7:34:21 AM6/9/22
to Google Ads API and AdWords API Forum
Hi,

Using python client,
I am getting campaigns with load_from_dict method of 'GoogleAdsService', 
I have given the login_customer_id in the config_dict, but getting permission denied 
error,

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.

Google Ads API Forum Advisor

unread,
Jun 9, 2022, 7:50:51 AM6/9/22
to ajaylin...@gmail.com, adwor...@googlegroups.com

Hello Ajay,

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

Please make sure that the login_customer_id you are setting in your config_dict belongs to a manager account that is linked to the account you want to get campaigns for.

Also make sure that you remove the hyphens from your manager account id when setting it in the login_customer_id field, i.e. 123-456-7890 should be set as 1234567890.

In case the issue persists, I would kindly ask you to please provide us with the complete logs (request and response with request-id) via the Reply privately to the author option.

To enable logging on the Python client library, you can follow this guide.

Thanks,

Mattia Tommasone
Google Ads API Team



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