Google Ads API Access via Oauth2 without dev-token

390 views
Skip to first unread message

Apithana B.

unread,
May 13, 2020, 5:11:59 AM5/13/20
to AdWords API and Google Ads API Forum
Hi.

I have some questions about accessing Google Ads API.

After I have logged in via Oauth2 and set every credential that required to call but,
What if i don't know Manager Account ID(login-customer-id) and i don't have developer-token even my customer-id
How do I get those things by Oauth2?

There are other ways to get access to Google Ads API?, Or provided a developer-token and login-customer-id with request header is just only one way to access the API?

Thank you.

Google Ads API Forum Advisor Prod

unread,
May 13, 2020, 12:14:36 PM5/13/20
to apit...@theiconweb.com, adwor...@googlegroups.com
Hi Apithana,

Thank you for reaching out to us. I see that you need to obtain your login-customer-id, developer token, and your customer-id. Your login-customer-id is your manager account's ID number. You can get this by logging into your Google Ads Manager Account and clicking the "?" button on the right hand corner. A drop down window will appear and your manager account ID number should be listed there. For your developer token, you can follow these steps to find your developer token. For your customer-id, this is the account number that you want to access. You can find the number of your account by logging into your manager account and click "Accounts" on the left hand sidebar. There, your accounts will be listed along with their 10-digit ID numbers.

Unfortunately you will need your developer token and your login-customer-id to access the API, as the token grants you access, and the login-customer-id helps locate which accounts you want to access using the API. Let me know if you have further questions.

Thank you,
Bryan, Google Ads API Team

ref:_00D1U1174p._5004Q1zLhMY:ref

Apithana B.

unread,
May 13, 2020, 12:42:25 PM5/13/20
to AdWords API and Google Ads API Forum
Hi Bryan

Thanks you for answering. In my meaning is, I have provided an Application to other people (e.g. Agency, Business). Does Google Ads API have another way to access by login with OAuth2 or obtain credentials in automatic way instead of manually copy in Google Ads Manager 

Google Ads API Forum Advisor Prod

unread,
May 13, 2020, 1:59:15 PM5/13/20
to apit...@theiconweb.com, adwor...@googlegroups.com
Hi Apithana,

Thank you for the update. Could I ask if you have used Web App OAuth to set up your client credentials? This OAuth type allows you to access other users accounts if they've granted you access. Let me know if you have further questions.

Apithana B.

unread,
May 13, 2020, 11:25:58 PM5/13/20
to AdWords API and Google Ads API Forum
Yes, I have used Web App OAuth. I have generated auth link from backend and send to users for grant them access.
I have follow the step until i got refresh_token. but the things i mentioned above is how do i get the data such as customer-id, developer-token without manually get from Google Ads API  

Google Ads API Forum Advisor Prod

unread,
May 14, 2020, 1:58:38 PM5/14/20
to apit...@theiconweb.com, adwor...@googlegroups.com
Hi Apithana,

For your concern with the developer token, you will need to use your own developer token as your app is trying to access the API. Developer tokens are legal entity specific, so users should not share their developer tokens. To pull a list of customers under a managing account, you can use the customer report. Let me know if you have further questions.
Reply all
Reply to author
Forward
0 new messages