How can I get developer token to test api in test account adwords?

5,176 views
Skip to first unread message

samsonph...@gmail.com

unread,
Jan 18, 2017, 9:01:04 AM1/18/17
to AdWords API Forum
Currently I am planning to test adwords API with test account. How can I get developer token? 
For developer token Do I need to create production manager account with same email id?

Shwetha Vastrad (AdWords API Team)

unread,
Jan 18, 2017, 1:54:01 PM1/18/17
to AdWords API Forum
Hi, 

Yes, you need to create a production manager account by following the instructions provided here. You can create this production manager account using any email address. Once you have created the manager account, please follow the instructions provided here to apply for API access and you'll be granted a developer token with test access which can be used with test accounts.

Regards,
Shwetha, AdWords API Team.

SUBIN P VASU

unread,
Feb 15, 2017, 1:52:44 PM2/15/17
to AdWords API Forum
I have test manager account and production manager account. How can I connect these through API? ie I need to connect my test account using  product account developer token. How can it be implemented?

Shwetha Vastrad (AdWords API Team)

unread,
Feb 15, 2017, 2:39:58 PM2/15/17
to AdWords API Forum
Hi Subin,

A developer token can be used to target any AdWords account. You just need to generate the OAuth2 credentials by logging in as the test manager account rather than the production manager account and use these credentials to make API requests against your test account. Please note that test and production accounts cannot interact in any way; you cannot use a test account under your existing production account. 

sath...@zakapps.com

unread,
Aug 4, 2017, 5:35:02 PM8/4/17
to AdWords API Forum
Hi Shwtha,

I could not able to get Developer token for Test Manager Account, even there is no Adswords API Center for Test Manager Account, then how can I access my test client account using Test Manager Account. Please clarify.

Thanks in Advance.

Regards,
Sathish Kumar

Shwetha Vastrad (AdWords API Team)

unread,
Aug 7, 2017, 9:59:23 AM8/7/17
to AdWords API Forum
Hi Sathish, 

You must have a production(non-test) AdWords manager account to apply for access to the API. You can create one by following these instructions. You'll only see the AdWords API Center link if you've logged in to a production manager account. You must use the production (non-test) manager account's developer token to make API calls against a test account. Even if the token is pending approval, you can still use it to make calls against test accounts.

emedia.t...@gmail.com

unread,
Mar 8, 2018, 5:46:37 AM3/8/18
to AdWords API Forum
I'm created a test manager account and created one test client account on this test manager acc. so , Now I need developer token for my API test. So what to do ?

1. I created one manager account , on same email id.  but I didn't find out any "API Center"  on "account setting" .
 
so how to I get this token ?  

emedia.t...@gmail.com

unread,
Mar 8, 2018, 6:56:17 AM3/8/18
to AdWords API Forum
I have a developer token , got form another Master account and I use that token on my test manager account which is register on another gmail account ,  
and I created credential for this test manager account but when I make API call is shows  => Failed to get campaigns. Exception says "Failed to refresh access token. { "error" : "invalid_grant" }"

so what is the issue ?

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Mar 8, 2018, 3:13:53 PM3/8/18
to AdWords API Forum
Hi, 

The 'invalid_grant' error usually occurs when the access token or refresh token is invalid or incorrect. Could you try regenerating the tokens following the steps in the linked guide? To verify that your credentials are correct, you could also try the CURL request provided below and see if you are able to generate the access token. 

curl https://www.googleapis.com/oauth2/v4/token \
-d refresh_token=<replace with your-refresh_token> \
-d client_id=<replace with your-client-id> \
-d client_secret=<replace with your-client-secret> \
-d grant_type=refresh_token

If you are still facing issues, could you please create a new thread and share the details of the error there? That will help us keep better track of the issues. 

Thanks,
Sreelakshmi, AdWords API Team

RAJKUMAR SHARMA

unread,
Apr 30, 2018, 5:06:33 AM4/30/18
to AdWords API and Google Ads API Forum
I am not able to get developer token from http request. Can i get developer token from http request.
please tell me if anyone knows.

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Apr 30, 2018, 2:07:15 PM4/30/18
to AdWords API and Google Ads API Forum
Hi Rajkumar, 

To get the developer token, you will need to sign into your production manager account and navigate to the AdWords API Center. If you don't have a production manager account, please create one and follow the instructions in this guide to get the developer token. A developer token by default will have test access. You will need to apply for the API access to get the token approved. Once approved, you can use that token to make API calls against production AdWords accounts. Let me know if you have any additional questions. 

RAJKUMAR SHARMA

unread,
May 15, 2018, 9:37:34 AM5/15/18
to AdWords API and Google Ads API Forum
hi sreelaksmi ,
is there any curl request to get developer token after creating an manager account.
or any url by using it i have to make request that i can send from postman and i am able to get developer token. 

Sreelakshmi Sasidharan (AdWords API Team)

unread,
May 15, 2018, 3:33:58 PM5/15/18
to AdWords API and Google Ads API Forum
Hi Rajkumar, 

The developer token can only be retrieved manually by logging into the production MCC account which owns the developer token. Unfortunately, the developer token is not accessible as a AdWords API Service response or using a curl request.

dev qw

unread,
Mar 19, 2020, 7:51:35 AM3/19/20
to AdWords API and Google Ads API Forum
I have created a test account and a manager account, I have the developer token. With the token I'm able to get campaigns but having issues while creating a campaign. 

It says OperationAccessDenied.ADD_OPERATION_NOT_PERMITTED @ operations[0]  

Please help to fix this issue, I wanted to create campaign using the API.

Thanks 


On Wednesday, 18 January 2017 19:31:04 UTC+5:30, samsonph...@gmail.com wrote:

Google Ads API Forum Advisor Prod

unread,
Mar 19, 2020, 12:57:00 PM3/19/20
to devops....@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for reaching out. Could you please send me the complete request and response logs along with client customer id for me to further investigate?

Thanks and regards,
Xiaoming, Google Ads API Team



 

ref:_00D1U1174p._5001UXVW5P:ref

dev qw

unread,
Mar 20, 2020, 9:37:45 AM3/20/20
to AdWords API and Google Ads API Forum
Hello,

Here are the details:
Test Account Customer ID: 766-515-3727
Production Account Number for Developer Token: 616-458-6149

Developer token: Swe8aCVXXXXXpDhUVFaDQ (SHARED COMPLETE OVER EMAIL)

I'm using PHP SDK with Laravel Framework:  https://github.com/spotonlive/laravel-google-ads

I have attached a screenshot of the error and log of the response, Also attached the complete request(AdController file), Please refer createCampaign Method for the complete request.

PS: I'm able to fetch the data like getting campaign but right now there is no campaign added so it's returning null.

I already replied you over email but no response until now

Best Regards,
Dev@qualwebs

dev qw

unread,
Mar 20, 2020, 9:38:51 AM3/20/20
to AdWords API and Google Ads API Forum
ATTACHING FILES


On Thursday, 19 March 2020 22:27:00 UTC+5:30, adsapiforumadvisor wrote:
AdController.php
laravel-2020-03-20.log
screenshot_22.png

Google Ads API Forum Advisor Prod

unread,
Mar 20, 2020, 3:30:23 PM3/20/20
to devops....@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for reaching out. I see that you were trying to create campaigns on the manager account 766-515-3727 and which caused the error. You are only supposed to mutate campaigns on a client customer account. Please let me know if you have any further concerns.



Thanks and regards,
Xiaoming, Google Ads API Team


 

ref:_00D1U1174p._5001UXVW5P:ref

dev qw

unread,
Mar 21, 2020, 2:02:56 AM3/21/20
to AdWords API and Google Ads API Forum
Hello,

Thanks for the response!

You mean I can only edit any existing campaign via API? But I wanted to create campaign using API.

I wanted to perform below action via API:

step 1: Create Shopping campaign

step 2: create Adgroup for Showcase ads

step 3: create Showcase ad

Also, When I try to create any campaign from the Google Ads Console, It returns no account(Please check the screenshot attached).

Please check and let me know the possibility to do actions I shared above.

Best,
Dev@qualwebs
screenshot_26.png

Google Ads API Forum Advisor Prod

unread,
Mar 23, 2020, 3:56:55 PM3/23/20
to devops....@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for reaching out. What I meant was that campaigns could not be created on a manager account but only on a client customer account. To solve this problem you could create a client customer account under the manager account and then create the campaigns under the newly created customer account. Please let me know if you have any further concerns.



Thanks and regards,
Xiaoming, Google Ads API Team


 

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