How to retrieve Adwords accounts ids and names from Google account
49 views
Skip to first unread message
eug...@fasterintel.com
unread,
Jun 14, 2017, 9:58:39 AM6/14/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AdWords API Forum
Hello,
I need to retrieve all Adwords accounts ids and names related to user Google account. I obtained access to scope "https://www.googleapis.com/auth/adwords" using OAuth2 similar to this article https://developers.google.com/analytics/devguides/config/mgmt/v3/quickstart/web-js and retrieved Analytics accounts and profiles from user account now I need the same for Adwords using javascript in browser (the best case for me) or c# (.net core) or in the worst case SOAP.
Thanks!
Sreelakshmi Sasidharan (AdWords API Team)
unread,
Jun 14, 2017, 2:30:18 PM6/14/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AdWords API Forum
Hi Eugene,
You can use the CustomerService.getcustomers() method to get all the customers directly accessible by the user authenticating the call. For that, you will have to make the API call without specifying the client customer id in the request header. In the API response, the customerId will have the account Id and the descriptiveName will have the name of the account. If you specify the client customer Id in your request, the API repose will contain the details of that specific account alone.
We do not have code samples for this specific case. But you can refer to the highlighted code snippet in AddSitelinks.cs sample to get an idea. Let me know if you have any additional questions.
Thanks, Sreelakshmi, AdWords API Team
eug...@fasterintel.com
unread,
Jun 14, 2017, 3:24:45 PM6/14/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AdWords API Forum
Hi Sreelakshmi,
Thank you for your answer.
As I understand Adwords .NET library, from your link, doesn't support .NET Core, does that mean that I have to implement SOAP calls myself or do we have other options?
Sreelakshmi Sasidharan (AdWords API Team)
unread,
Jun 15, 2017, 10:23:09 AM6/15/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AdWords API Forum
Hi Eugene,
Could you please post your question on the .NET library? The library owner will be better equipped to address your question.