CustomerService --> getCustomers returning just one Customer

642 views
Skip to first unread message

Angel Lubenov

unread,
Jan 19, 2017, 4:21:21 PM1/19/17
to AdWords API Forum, Angel Lubenov

Hi!, This is the situation: 

I am connecting to the API with my manager account, I want to retrieve all the accounts information, I am making the request without the clientCustomerId parameter, but I got just one client information (me) and not all the clients as the documentation says. 

How can I retrive the infor for all the accounts???



Thanks in advance: 

Next is one screenshot showing I have several accounts to manage and an example of the SOAP XML call.





SOAP XML CALL:


<x:Envelope xmlns:x="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="https://adwords.google.com/api/adwords/mcm/v201609" xmlns:v="https://adwords.google.com/api/adwords/cm/v201609">

    <x:Header>

        <v1:RequestHeader>

            <v:developerToken>xxxxxxxxxxxxxxxxxxxxx</v:developerToken>

            <v:userAgent>?</v:userAgent>

            <v:validateOnly>false</v:validateOnly>

            <v:partialFailure>false</v:partialFailure>

        </v1:RequestHeader>

    </x:Header>

    <x:Body>

        <v1:getCustomers/>

    </x:Body>

</x:Envelope>

Shwetha Vastrad (AdWords API Team)

unread,
Jan 19, 2017, 6:04:49 PM1/19/17
to AdWords API Forum, v-alu...@tableau.com
Hi Angel,

As mentioned in this blog post, you can now associate up to 5 AdWords accounts to a single email address. As a result, CustomerService.getCustomers() method can now return you multiple accounts associated with the email address. This is not to be confused with client accounts under a manager account. In your case, since you have just your manager account "TestMgrAccount" associated with your email address, the response will contain only one account. If you associate more accounts with your email address, you'll be able to use the CustomerService.getCustomers() method to retrieve all these accounts.

Regards,
Shwetha, AdWords API Team. 

Angel Lubenov

unread,
Jan 20, 2017, 7:42:11 AM1/20/17
to AdWords API Forum, v-alu...@tableau.com
Oh :-( .... I really was looking for getting the client accounts under my account.
 
Is there any API-endpoint to get the information about the client accounts under my manager account? 

Thanks in advance (again :-) )

Angel

Shwetha Vastrad (AdWords API Team)

unread,
Jan 20, 2017, 11:24:05 AM1/20/17
to AdWords API Forum, v-alu...@tableau.com
Hi Angel,

You need to use ManagedCustomerService to retrieve the client accounts under your manager account. The GetAccountHierarchy Java example demonstrates how to use this service to retrieve the account hierarchy under a manager account. Example code in other languages is available here.

Angel Lubenov

unread,
Jan 20, 2017, 3:35:50 PM1/20/17
to AdWords API Forum, v-alu...@tableau.com
Great!, 
Thanks a lot for your help!!!

Austin Becker

unread,
Jun 17, 2020, 12:23:21 PM6/17/20
to AdWords API and Google Ads API Forum
Hello, I have a similar question. I'm not sure how to programmatically find a user's client_customer_id in order to add it to my yaml file. I could ask the user to type their client_customer_id into my web app, but I'd rather get a list of all the client_customer_ids associated with their email address, then let them select which client_customer_id they'd like to work with using my app.

Is this not possible?

Thank you for your help!
Message has been deleted

Google Ads API Forum Advisor Prod

unread,
Jun 17, 2020, 3:41:51 PM6/17/20
to aus...@adautomator.com, adwor...@googlegroups.com
Hi Austin,

Thank you for reaching out. Unfortunately, this is not possible as email is not a field that can be selected in ManagedCustomerService. You can see a list of selectable fields in this documentation. If you have any additional questions, please don't hesitate to reach out.

Regards,
Danica, Google Ads API Team

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