CustomerService Output difference between 2 versions of API

55 views
Skip to first unread message

cv

unread,
Nov 3, 2016, 8:51:55 AM11/3/16
to AdWords API Forum
Hello Team,

I am using code to get Customers using CustomerService,
And I am seeing that there is difference in results between 2 versions of API.

For v201605 
  $CustomerService = $user->GetService('CustomerService', ADWORDS_VERSION);
  $graph = $CustomerService->get();

This code gives me Only one customerID

For v201609 
    $CustomerService = $user->GetService('CustomerService', ADWORDS_VERSION);
    $graph = $CustomerService->getCustomers();

This will gives me 2 customerID.

How this are the possible between 2 versions of API?

If anyone can help me to correct same would be helpful.

Thanks,


Shwetha Vastrad (AdWords API Team)

unread,
Nov 3, 2016, 3:13:25 PM11/3/16
to AdWords API Forum
Hi Chirag,

In API version v201607, the get() method of CustomerService was removed and replaced with getCustomers() method. Starting with v201607, if no clientCustomerId is specified, then the response will contain multiple entries if more than one account is directly accessible by the authenticated account. If you only want results for a single account, you must specify the clientCustomerId in your request. 

As mentioned in this blog post, you can now associate up to 5 AdWords accounts to a single email address. As a result, CustomerService.getCustomers can now return you multiple accounts associated with the email address. This is most likely why you are getting different results from different versions of the API. 

Regards,
Shwetha, AdWords API Team.

cv

unread,
Nov 4, 2016, 1:31:23 AM11/4/16
to AdWords API Forum
Hello Shwetha,

Thanks, things are more clear now.

As mentioned in this blog post, you can now associate up to 5 AdWords accounts to a single email address. As a result, CustomerService.getCustomers can now return you multiple accounts associated with the email address. This is most likely why you are getting different results from different versions of the API. 
--> Is it possible from associate 5 Adwords accounts one can associate MCC Account as well?

Thanks,

Shwetha Vastrad (AdWords API Team)

unread,
Nov 4, 2016, 11:12:33 AM11/4/16
to AdWords API Forum
Hi Chirag,

Yes, you can associate multiple MCC accounts to a single email address as well. This post also provides more details about multiple account access. 
Reply all
Reply to author
Forward
0 new messages