Re: Getting CustomerId with PHP

2017-09-21 Thread Joven Albarida
You can also try this out, if you want to list individual items.. https://developers.google.com/adwords/api/docs/reference/v201705/CustomerService.Customer $customerService = $adWordsServices->get($session, CustomerService::class); $customers = $customerService->getCustomers(); foreach($customers

Re: Getting CustomerId with PHP

2017-05-31 Thread 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum
Hi, Could you try the code snippet provided below? $customerService = $adWordsServices->get($session, CustomerService::class); $customers = $customerService->getCustomers(); //assuming that only one AdWords account is directly accessible by the authenticated account $customer = $customers[0];

Re: Getting CustomerId with PHP

2017-05-31 Thread Mihai Iliescu
Thanks Shwetha Vastrad. Can someone help me with the code. I tried the one bellow but it does not seem to print anything out: [...] use Google\AdsApi\AdWords\v201702\mcm\CustomerService; [...] $adWordsServices = new AdWordsServices(); $CustomerService= $adWordsServices->get($session, CustomerSer

Re: Getting CustomerId with PHP

2017-05-30 Thread 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum
Hi, ManagedCustomerService requires the clientCustomerId to be set in the request header. If you are looking to get the CustomerId using the OAuth2 credentials, you could consider using CustomerService.ge

Getting CustomerId with PHP

2017-05-30 Thread Mihai Iliescu
I'm trying to get the Customer ID but I get this error: PHP Fatal error: Uncaught exception 'Google\\AdsApi\\AdWords\\v201702\\cm\\ApiException' with message '[AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED @ ; trigger:'']' in /var/www/html/adwords/vendor/googleads/googleads-php-lib/src/G