Hi James, 

If you haven't set the clientCustomerId in your auth.ini file, then you'll 
not be able to retrieve it from the AdWordsUser object. To use the 
CustomerService to retrieve the AdWords account associated with the 
authenticated user, you need to use the getCustomers 
<https://developers.google.com/adwords/api/docs/reference/v201702/CustomerService#getcustomers>
 method 
as shown here 
<https://github.com/googleads/googleads-php-lib/blob/deprecated/examples/AdWords/v201702/Extensions/AddSitelinks.php#L48>.
 
If the authenticated user is linked to just one AdWords account, then the 
response will contain the details of that customer. If a clientCustomerId 
is specified in the request header, only details of that customer will be 
returned. If no clientCustomerId is specified in a request, the response 
will contain multiple entries if more than one account is directly 
accessible by the authenticated user. 

On another note, in December 2016, we announced 
<http://googleadsdeveloper.blogspot.com/2016/12/announcing-new-ads-php-client-library.html>
 the 
stable release of the new ads PHP library and the deprecation of the old 
one. The new PHP library has many improvements such as support of 
namespaces and Composer <https://getcomposer.org/> installation. The 
AdwordsUser 
<https://github.com/googleads/googleads-php-lib/blob/deprecated/src/Google/Api/Ads/AdWords/Lib/AdWordsUser.php>
 which 
was used to configure the AdWords settings is now replaced by the 
AdWordsSessionBuilder 
<https://github.com/googleads/googleads-php-lib/blob/master/src/Google/AdsApi/AdWords/AdWordsSessionBuilder.php>.
 
Please see the upgrading guide 
<https://github.com/googleads/googleads-php-lib/blob/master/UPGRADING.md> for 
more details. 

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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
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/57bce676-8d2a-4fff-9259-857a7b7f2e77%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