Not able to use test account. Getting USER_PERMISSION_DENIED error

30 views
Skip to first unread message

ra...@usermind.com

unread,
Oct 24, 2018, 7:01:57 AM10/24/18
to AdWords API and Google Ads API Forum

This is what I have done
- Created a new gmail account (call it Prod...@gmail.com) and created Production Manager Account using this new gmail account
- Created a new gmail account (call it Test...@gmail.com) and created a Test Manager Account with this new gmail account
- Created a set of OAuth Client Crendentials using Prod...@gmail.com ( I had to create a new Project as well)
- Generated a developer token for ProdManager account through API Center
- Authenticated and generated refreshtoken with oauth client credentials against Test gmail account (access type was set to offline and user consent prompt was setup too)
- Configured, Client Id, Client Secret, Refresh token, Test Account Client Customer Id, Prod Manager Developer Token, Some random UserAgent
- When I try to list the Campaigns, I endup getting AuthorizationError.USER_PERMISSION_DENIED


Not sure what I am missing and why I get this error. Any help would be much appreciated

Milind Sankeshware (AdWords API Team)

unread,
Oct 24, 2018, 1:43:03 PM10/24/18
to AdWords API and Google Ads API Forum
Hello, 

Could you confirm if you were logged in as the test gmail account when manually accepting the prompt? If yes, were you making the API call against the test manager account? Since the test gmail account has only access to the test manager, you can make the API calls against that manager or the client accounts in that hierarchy only. Attempting a call against the production account will fail with user permission denied. If you are unsure that you used the right email address, my suggestion is to use an incognito browser window and make sure to use the credentials of the test gmail account. That way the possibility of using another sign on can be avoided. 

Also, please note that the CampaignService.get() should only be performed against a client account. If the call is made against a manager account, the results will be empty. 

Thanks,
Milind, AdWords API Team
Reply all
Reply to author
Forward
0 new messages