:User doesn't have permission to access customer" error when trying to use API for test account

82 views
Skip to first unread message

Ľubo Janček

unread,
Feb 4, 2021, 7:09:37 AM2/4/21
to AdWords API and Google Ads API Forum
Hello,

I have followed the documentation how to create a test account.
I have ended up with a production account and a test account under the same google account:
Screenshot 2021-02-04 at 12.52.02.png

In my production account, I have created a developer token with an Access level of Test Account.
In developer console I have created an Oauth 2 client ID:
Screenshot 2021-02-04 at 12.57.54.png

I have used this Client ID to create a refresh token using Python client library.
Then I've tried to verify if I'm able to interact with API with this example:
https://github.com/googleads/google-ads-python/blob/master/examples/basic_operations/add_campaigns.py

I'm using yaml file to initialise the API client. When I use customer ID of the production manager (688-828-8129), I get this error:
"The developer token is not approved. Non-approved developer tokens can only be used with test accounts"
This is expected, because I only have Test level access. But at least I can access that manager account.

However what concerns me, is that when I use the test manager ID (438-671-3590) as a customer ID, I get this error:
""User doesn\'t have permission to access customer..."

The documentation states:
"Important: Use the developer token of your production manager account when making requests against the test manager account. Even if it's not approved yet, the token will still work on test accounts, including the ones just created."
https://developers.google.com/google-ads/api/docs/first-call/overview#test_account

What am I doing wrong? How could I set it up so I can use API to access my test account? (I don't API Center option in Tools&Settings>SETUP in my test account)

Thank you





Google Ads API Forum Advisor Prod

unread,
Feb 5, 2021, 11:35:43 AM2/5/21
to lub...@gmail.com, adwor...@googlegroups.com

Hi Ľubo,

Thank you for reaching out. This error indicating that you don’t have permission to access the customer most probably comes from the fact that you were not using the email of account 438-671-3590 to generate the OAuth2 credentials, however, you were trying to access this manager account. Please use the email of 438-671-3590 to generate the OAuth2 credentials and try it again. Also keep in mind that you are supposed to add campaigns to a client customer account rather than a manager account.

Thanks and regards,
Xiaoming, Google Ads API Team
 

Google Logo
Xiaoming
Google Ads API Team
 


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