Get all accounts with token on new api v0

57 views
Skip to first unread message

cos...@gmail.com

unread,
Jun 6, 2018, 9:16:27 AM6/6/18
to AdWords API and Google Ads API Forum
I'm trying to get a list of all the accounts of a user via the new beta API. I can't seem to find the correct endpoint.
Is there a complete list of all the endpoints to interact via the rest API? What's the correct endpoint to get all accounts of a user using just the token?

Teja Makani

unread,
Jun 6, 2018, 3:33:03 PM6/6/18
to AdWords API and Google Ads API Forum
Hello Costantin,

Welcome to Google Ads API v0_1. You can use the CustomerService to get the details of a specific Customer but I am afraid, getting all the accounts which a user has access to, is not currently available via Google Ads API v0_1. As this API gradually rolls out, it will reach full parity with the current API. You can find the full list of services available in Google Ads API v0_1 from here. Please let me know if you have any further questions.

Regards,
Sai Teja, AdWords API Team.

ju...@norte.digital

unread,
Nov 13, 2018, 10:28:59 PM11/13/18
to AdWords API and Google Ads API Forum
Hi, we are currently in version v-0.5, I wonder if this functionality is already available?

Teja Makani

unread,
Nov 14, 2018, 2:40:15 PM11/14/18
to AdWords API and Google Ads API Forum
Hello Costantin,

Yes, The functionality is available from the latest version of Google Ads API Beta v0.5.0. You could use CustomerService.ListAccessibleCustomers which returns resource names of customers directly accessible by the user authenticating the call. You could try the code snippet shown below in the GetAccountInformation.java to perform this operation via Java client library. Code samples for other languages can be found here. Please let me know if you have any further questions.

ListAccessibleCustomersResponse customer = customerServiceClient.listAccessibleCustomers(ListAccessibleCustomersRequest.newBuilder().build());


Regards,
Sai Teja, AdWords API Team.

Reply all
Reply to author
Forward
0 new messages