Cant create sub account through API

45 views
Skip to first unread message

Qumars Ravaei

unread,
Sep 6, 2021, 11:50:16 AM9/6/21
to AdWords API and Google Ads API Forum
I am trying to setup a class for managing google ads accounts (i.e. create sub accounts under a manager, edit their settings etc.) However I keep getting this error when I try and create a new user

"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"

I am using the manager accounts login id in the yaml file as well as the managers client-id , secret, and refresh token. With this manager account I was successful in linking an already existing account to it, however I created two new sub accounts (where I am the owner) through the dashboard, and when I use  customer_service.list_accessible_customers I only see the one pre-existing account that I linked and not the two other accounts which I created and own.

Why is it that through the dashboard I can create users, but for some reason I dont have permission to create users through the python API. This is a link to the method I'm using


What I have is word for word the same except I set currency and time zone for my own area and I exclude tracking_url_template and final_url_suffix.

I am using GoogleAdsClient.load_from_storage as my client if that matters, up until now I have only been using google ads api for editing ads on one account  (creating camapigns, ad groups, deleting and creating budgets etc.) so I dont know if there is supposedly a different client that I must be using for making manager level requests.

Kindly Help

Qumars R.



Qumars Ravaei

unread,
Sep 8, 2021, 1:20:44 PM9/8/21
to AdWords API and Google Ads API Forum
Any updates pls?

Google Ads API Forum Advisor

unread,
Sep 8, 2021, 10:52:41 PM9/8/21
to quma...@gmail.com, adwor...@googlegroups.com

Hi Qumars,

Thanks for reaching out to us.

Could you provide us with the complete request and response logs with the request-id, so our team can better check?

If you haven't yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Python) > Logging documentation, which you can access from this link. 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 googleadsa...@google.com alias instead.

Regards,

Google Logo
Yasar
Google Ads API Team
 


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