Hi Shwetha,

OK, so if I call getCustomers() with the oauth credentials the return is an 
array, but it sounds like you're saying that the array will only ever have 
1 node and that will be the customer associated with the oauth credentials. 
 If that's the case then I think i am set, please confirm that is the case.

The ManagedCustomerService is what we are doing now, so glad that hasn't 
changed.

Thanks,
James


On Tuesday, April 25, 2017 at 3:35:28 AM UTC+9, Shwetha Vastrad (AdWords 
API Team) wrote:
>
> 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/700b3713-278b-4d6e-b61c-7604998d957a%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