First API Call sample return DEVELOPER_TOKEN_NOT_APPROVED error

77 views
Skip to first unread message

ImmobiPortal ImmobiWeb

unread,
Jul 25, 2016, 5:10:16 AM7/25/16
to AdWords API Forum
Good day.

I have create a test account manager and from the ggogle adwords interface I have created an account client.
Then I have created a google project using the google adwords api guide.
I downloaded the adwords-axis-jars-and-examples-2.16.0 and I run GetRefreshToken in order to obtain the developerToken.
Then I set it and the others values on ads.properties.

I try to run GetCampaigns but a DEVELOPER_TOKEN_NOT_APPROVED error occurs.

In my google adwords preferences the account is setted as test account ad reading the giude I can use it in order to test my api software.
When I tested (with your example) the functionality I request the approvation.

How can I resolve the problem?

Best regards and good work.

Stefano Errani

Peter Oliquino

unread,
Jul 25, 2016, 6:14:58 AM7/25/16
to AdWords API Forum
Hi Stefano,

The developer token of your account can be seen by logging into your AdWords account and by clicking the Gear Icon and -> Account Settings -> AdWords API Center and not through the GetRefreshToken example. Please use the developer token from the AdWords API Center and use it as the value for the 'api.adwords.developerToken' property in your ads.properties file.

If the issue persists, could you provide more information e.g. the clientCustomerId you were using and your production MCC ID as well so I can better investigate the issue? Please do so using Reply privately to author.

Thanks and regards,
Peter
AdWords API Team

Peter Oliquino

unread,
Jul 25, 2016, 7:16:06 AM7/25/16
to AdWords API Forum
Hi Stefano,

The error is caused because you were trying to make calls to a production account using an unapproved token (test account access only). I have checked the client ID you provided and have seen that it is a production client account and that your developer token also currently has test account only access. If you wish to use the API using a test account, you will need to fill up this test account application form and once done, you may use the customer ID of that test account as the value for the customerClientId property of your ads.properties file and make calls in the API using a test account. 

Once your developer token gets approved, that is when you may be able to make API calls using your production client ID. I hope this had been helpful and please let me know if you still face any issues.

Thanks,
Peter
AdWords API Team

ImmobiPortal ImmobiWeb

unread,
Jul 25, 2016, 11:51:51 AM7/25/16
to AdWords API Forum
Good day.

When I create the account manager that you've seen, I used the form that you have indicated, infact in the API Center the level of access is "test account" followed by link "request basic access".

One question: as type of company I have specified "Agency/SEM": I must to indicate "Independent AdWords Developer" in order to run the example correctly?

Best regards and goof work.

Stefano Errani

Peter Oliquino

unread,
Jul 25, 2016, 10:26:52 PM7/25/16
to AdWords API Forum
Hi Stefano,

Good day! The type of company you indicate does not cause the error. As mentioned earlier, the DEVELOPER_TOKEN_NOT_APPROVED error is caused when you are making calls to a production account when your developer token still has test account only access. The manager ID and client ID you provided in your previous reply are both production accounts and thus, any calls made to those accounts using your current developer token would result in the specified error. Also, the "Access level Test Accounts" that you see in the AdWords API Center is an indicator that your production manager account's developer token is not yet approved.

Additionally, test accounts when viewed in the AdWords web interface has a red label indicating that it is a test account and test manager accounts do not have the AdWords API Center view . In order to utilize your developer token while it is still not approved, you will need to create a test manager account using this form. You may also follow this guide for test accounts for more information.

If you have already created the test account, could you kindly send it to me so I can verify? Please send your reply once again using Reply privately to author. Thank you.

Best regards,
Peter
AdWords API Team
Reply all
Reply to author
Forward
0 new messages