How can I test the API with a test account?

129 views
Skip to first unread message

Jason Tiscione

unread,
May 23, 2020, 11:44:07 PM5/23/20
to AdWords API and Google Ads API Forum
I have a developer key associated with a production manager account, but trying to use the API generates DEVELOPER_TOKEN_NOT_APPROVED errors.

So I tried following instructions at https://developers.google.com/adwords/api/docs/guides/accounts-overview#test_accounts but they aren't very clear and don't work.

I created a Test Manager account using one of my other Google accounts, and used its ID as the client_customer_id in adwords.yaml.

Using the production manager account's developer token with the API generates USER_PERMISSION_DENIED errors.

Is there any way to test the API with a test account or do I have to wait for the developer token to be approved?

Google Ads API Forum Advisor Prod

unread,
May 26, 2020, 10:52:30 AM5/26/20
to tisc...@gmail.com, adwor...@googlegroups.com
Hi Jason,

Thank you for reaching out to us. I see that you're trying to test the API using a test account. I see that you currently have a developer token with test account level access. This means that it can be used to call accounts that are test accounts. Could you make sure you've done the following below?

1. Have you followed these steps to create a test account and manager test account?

2. Are you using our client libraries? They all have examples preset to easily access the API.

3. Have you set up your client credentials for your account? Make sure that your user has been given correct access to the account you're trying to access. You can see if you have correct access by logging into the account you want to access in the UI, and then click "Tools and Settings" > "Setup" > "Account Access", and check if your email address is set under "Users".

4. Have you obtained your refresh token?

For the errors you're encountering, you can see what they mean below.

1. "Developer token not approved" means that you're using your test account level developer token to access production level accounts (not test accounts). You should make sure you're either making calls to test accounts or upgrade your developer token to basic level access.

2. "User Permission Denied" means that the link between the manager and client account was removed or that your OAuth credentials are for a user who does not have access to the client customer ID specified or any of its manager accounts. For this issue, could you provide me with your request and response logs for where this error occurs?

Let me know if you have further questions.

Thank you,
Bryan, Google Ads API Team

ref:_00D1U1174p._5004Q1zrcQA:ref

Arlen C

unread,
May 27, 2020, 4:40:17 AM5/27/20
to AdWords API and Google Ads API Forum
Hi Bryan,

The link in #1 with steps to create a manager test account are not very specific, could you clarify the steps needed there?

Step 1 of that document says:
"Go to the Google Ads manager accounts page and create a test manager account."

However, the link takes us to a generic landing page. When creating accounts, is there a specific option to use which forces it to be a test manager account? We have created new users under new accounts, not linked to our primary account, but find no method of labeling any manager account as 'test' -- could you provide screenshots or specific links which allow this to happen?



Thank you

Arlen C

unread,
May 27, 2020, 5:22:34 AM5/27/20
to AdWords API and Google Ads API Forum
I believe I have it working, and am leaving a note for whomever may benefit from this. I'll try and leave as much detail as possible, even if some of them are basic:



  1. If you don't already have a production manager account: 
    1. Create a new ads account at https://ads.google.com/ using any user (te...@example.com)
    2. If you don't right away want a live campaign, click 'Switch to expert mode' at the bottom and then click 'Create an account without a campaign'
  2. Now that you have a production manager account, you want to create a test manager account using the same google account (te...@example.com).  
    1. To do this, the correct link doesn't seem to be in the API docs but instead is in the adwords doc:
      https://developers.google.com/adwords/api/docs/guides/accounts-overview#test_accounts
    2. Go to step 2 of that document, "Create a test manager account" and it takes you to:
      https://adwords.google.com/um/Welcome/?sf=mt
      The important part seems to be 'sf=mt' parameter -- without that, you are creating a production account
    3. When you land on that page, do NOT click any of your existing accounts in the "Use google ads as.." and do NOT switch google accounts using the "Switch google account" button. You must use the same google account but a new google ads account
      Click "New google ads account"
    4. Now on the next page, you will see a red 'test account' box at the top right. 
      Just fill out the name and basic details, click submit, and you're done!
  3. Create an account under your test manager account
  4. Use your API token from the production manager account and the client IDs from your test manager account in your API configuration
I believe that's it - however I'm writing from memory so excuse any mistakes and please reply if you find something out of place. 


Cheers,
Arlen

Reply all
Reply to author
Forward
0 new messages