get list of all client customer id

796 views
Skip to first unread message

Syed Arif Ullah Shah

unread,
May 12, 2014, 8:33:27 PM5/12/14
to adwor...@googlegroups.com
Hi,

I am developing some dashboards based on campaignperformancereport. I have an MCC account and I have around 20 client accounts there. There could be more in future. I want to get the list of all client customer id so that I can send these clientcustomerid to campaignperformancereport one by one. However, I am not able to find any method to achieve this. Can someone please tell me how can I get the list of all clients from MCC client using adwords api

I need a specific Soap xml request that will return the list of clients. I have tried the below soap request but I am not sure how to get the auth token and secondly the soap requests is giving errors. I am looking for something similar but which is a valid request. I already have an MCC account, and have also created clientid and secret id

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="https://adwords.google.com/api/adwords/mcm/v201209" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="https://adwords.google.com/api/adwords/cm/v201209">
  <env:Header>
    <wsdl:RequestHeader xmlns="https://adwords.google.com/api/adwords/cm/v201209">
      <userAgent>user-agent</userAgent>
      <developerToken>developer-token</developerToken>
      <authToken>auth-token</authToken>
    </wsdl:RequestHeader>
  </env:Header>
  <env:Body>
    <get xmlns="https://adwords.google.com/api/adwords/mcm/v201209">
      <serviceSelector>
        <ns0:fields>Login</ns0:fields>
        <ns0:fields>CustomerId</ns0:fields>
        <ns0:fields>Name</ns0:fields>
      </serviceSelector>
    </get>
  </env:Body>
</env:Envelope>

Regards
Arif

Josh Radcliff (AdWords API Team)

unread,
May 14, 2014, 12:39:50 PM5/14/14
to adwor...@googlegroups.com
Hi Arif,

It sounds like you are trying to manually construct your SOAP messages. I recommend using one of our Client Libraries, as they allow you to focus on the AdWords API object model instead of the minutiae of SOAP XML.

In each client library you'll find the following to help with your specific questions.
  1. A wiki on OAuth2 that walks you through the process of generating an OAuth2 refresh or access token.  For example, the OAuth2 wiki for our Java library is here
  2. A GetAccountHierarchy code example under the accountmanagement folder that shows how to use the client library to retrieve the list of clients under an MCC. For example, the Java library example is here.
Cheers,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages