not able to get clientcustomerid of other person who logged in

27 views
Skip to first unread message

RAJKUMAR SHARMA

unread,
Jun 29, 2018, 8:10:48 AM6/29/18
to AdWords API and Google Ads API Forum
hi,
i have just used this request url ------>  https://adwords.google.com/api/adwords/mcm/v201806/ManagedCustomerService?wsdl for getting a customerClientID and managerCustomerId
   i wanna know how use this request for getting other user data who logged through my client and client secret by that i m getting its refresh token.
  i have used this request
 --header Authorization:Bearer ********************
 --headerdeveloperToken:XXXXXXXX
 --header Content-Type:application/xml
and in xml i used 

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <soapenv:Header>
        <ns1:RequestHeader xmlns:ns1="https://adwords.google.com/api/adwords/mcm/v201806" soapenv:mustUnderstand="0">
            <ns2:clientCustomerId xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201806">492-330-398</ns2:clientCustomerId>
            <ns3:developerToken xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201806">XXXXXXXXXXXXXXerToken>
            <ns4:userAgent xmlns:ns4="https://adwords.google.com/api/adwords/cm/v201806">unknown (AwApi-Java, AdWords-Axis/3.15.0, Common-Java/3.15.0, Axis/1.4, Java/1.8.0_171, jars, SelectorBuilder, SelectorField)</ns4:userAgent>
            <ns5:validateOnly xmlns:ns5="https://adwords.google.com/api/adwords/cm/v201806">false</ns5:validateOnly>
            <ns6:partialFailure xmlns:ns6="https://adwords.google.com/api/adwords/cm/v201806">false</ns6:partialFailure>
        </ns1:RequestHeader>
    </soapenv:Header>
    <soapenv:Body>
            <serviceSelector>
                <ns7:fields xmlns:ns7="https://adwords.google.com/api/adwords/cm/v201806">CustomerId</ns7:fields>
                <ns8:fields xmlns:ns8="https://adwords.google.com/api/adwords/cm/v201806">Name</ns8:fields>
                <ns9:paging xmlns:ns9="https://adwords.google.com/api/adwords/cm/v201806">
                    <ns9:startIndex>0</ns9:startIndex>
                    <ns9:numberResults>500</ns9:numberResults>
                </ns9:paging>
            </serviceSelector>
        </get>
    </soapenv:Body>
</soapenv:Envelope>

that is working only for my account credentials like there should be my account  refresh token and client customer id and developer token 
please tell me how can i get other user details who logged in with clientid and client secret . how i can get other account details like its  managerCustomerId , clientCustomerId  for my api creation

i am stuck in this process .
thanks


Milind Sankeshware (AdWords API Team)

unread,
Jun 29, 2018, 2:49:45 PM6/29/18
to AdWords API and Google Ads API Forum
Hi,

Could you please confirm if you are trying to get other accounts which are under your MCC account? If yes, then your request should work. If you are looking to fetch other accounts which are not under your MCC hierarchy then you will need to add user email as a user on that account or link the account to your MCC. The Access level in API will be same what you have in the UI. The credentials cannot be shared. However, while setting up the OAuth, you could ask the user who has access to the specific account to generate the authorization code and then you can continue the setup to create the refresh token. Using this refresh token you will be able to access the AdWords accounts that user has access to. 

Thanks,
Milind, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages