ManagedCustomerService vs CustomerService

1,247 views
Skip to first unread message

te...@segment.com

unread,
Sep 6, 2016, 2:54:38 PM9/6/16
to AdWords API Forum
If I want to get all customers / AdWords accounts accessible to the Google user currently authenticated, should I use ManagedCustomerService or CustomerService?

Shwetha Vastrad (AdWords API Team)

unread,
Sep 6, 2016, 5:43:29 PM9/6/16
to AdWords API Forum
Hi Tejas, 

I would recommend that you use ManagedCustomerService to get all the accounts accessible by the user authenticated in the request. You could use the GetAccountHierarchy Java example to get the account hierarchy under the current account. Example code in other languages is available here

Regards,
Shwetha, AdWords API Team.
Message has been deleted

Tejas Manohar

unread,
Sep 6, 2016, 5:48:07 PM9/6/16
to adwordsapiad...@google.com, AdWords API Forum
What's the actual method being used to get account hierarchy? I don't see it listed here- https://developers.google.com/adwords/api/docs/reference/v201607/ManagedCustomerService

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "AdWords API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/uhbsu9rbTIM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/55da0517-d25e-4c61-8699-7add7dae1eca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Best regards,

Tejas Manohar

Tejas Manohar

unread,
Sep 6, 2016, 5:48:43 PM9/6/16
to adwordsapiad...@google.com, AdWords API Forum
Can you use get() on ManagedCustomerService w/ a selector that just asks for certain Fields[] to get all accounts?

Shwetha Vastrad (AdWords API Team)

unread,
Sep 7, 2016, 10:01:42 AM9/7/16
to AdWords API Forum, adwordsapiad...@google.com
Hi Tejas,

Yes, you can use the get method on ManagedCustomerService, which will return a list of Customers identified by the selector. This is the method used in the example I provided earlier to get account hierarchy.

te...@segment.com

unread,
Sep 7, 2016, 5:45:40 PM9/7/16
to AdWords API Forum, adwordsapiad...@google.com

Shwetha Vastrad (AdWords API Team)

unread,
Sep 8, 2016, 10:11:19 AM9/8/16
to AdWords API Forum
Hi Tejas,

Here are the production WSDLs for CustomerService and ManagedCustomerService:
Shwetha, AdWords API Team.

te...@segment.com

unread,
Sep 9, 2016, 1:23:06 PM9/9/16
to AdWords API Forum
What's the actual difference b/w Managed Customer Service .get() and Customer Service .get()? I read here- https://developers.google.com/adwords/api/docs/reference/v201607/ManagedCustomerService that 
>Client Customer Id is required if CustomerIdMode is set to CLIENT_EXTERNAL_CUSTOMER_ID. Starting version V201409 ClientCustomerId will be required for all requests except for CustomerService.get

Doesn't that mean Customer Service .get() would be the best endpoint to use for our tool to show a list of AdWords accounts that we can connect to?

Shwetha Vastrad (AdWords API Team)

unread,
Sep 9, 2016, 4:15:04 PM9/9/16
to AdWords API Forum
Hi Tejas,

The get() method of CustomerService was removed in API version v201607. You need to use getCustomers() instead. See the updated Managing Accounts guide for details. CustomerService getCustomers method returns the details of the authenticated account if the clientCustomerId is not set in the request header. If clientCustomerId is specified, only details of that customer will be returned. 

To get a list of all accounts you can access using the OAuth credentials available, you could probably use the CustomerService.getCustomers() method to retrieve the clientCustomerId of the account you're authenticated as and use this clientCustomerId to get the account hierarchy under this account using ManagedCustomerService.
Reply all
Reply to author
Forward
0 new messages