Hi James, 

Assuming you have the OAuth2 credentials of the user for whom you need to 
retrieve the AdWords account details, you need to use 
CustomerService.getCustomers() 
<https://developers.google.com/adwords/api/docs/reference/v201702/CustomerService#getcustomers>
 method 
without setting the clientCustomerId 
<https://developers.google.com/adwords/api/docs/guides/call-structure#request_headers>
 header 
along with the credentials generated. The response will contain the details 
of all AdWords accounts associated with the authenticated Google account.

Please note that you'll only be able to get the AdWords account which can 
be directly accessible by this user. If the user has access to a manager 
account and you would like to retrieve the client accounts linked to this 
manager, you need to use ManagedCustomerService 
<https://developers.google.com/adwords/api/docs/reference/v201702/ManagedCustomerService>
 as 
shown in this example 
<https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201702/AccountManagement/GetAccountHierarchy.php>
. 

Regards,
Shwetha, AdWords API Team.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
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/9331df9d-f8fd-4f00-8980-5857769f34ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • ClientCustomerI... James Andrews
    • Re: Client... James Andrews
      • Re: Cl... 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum
        • Re... James Andrews
          • ... 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum
            • ... James Andrews
              • ... 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum

Reply via email to