Get MCC Client ID Programmatically

93 views
Skip to first unread message

Siddharth Khurana

unread,
Mar 15, 2017, 8:16:26 AM3/15/17
to AdWords API Forum
Hi,

I am new to Adwords api so excuse my lack of knowledge.

Just wanted to check if there is any way to programmatically pull the MCC client ID without physically adding it in the session builder code?

Thanks,
Sid

Shwetha Vastrad (AdWords API Team)

unread,
Mar 15, 2017, 1:18:46 PM3/15/17
to AdWords API Forum
Hi Sid, 

To retrieve the CustomerId you need to use the CustomerService.getCustomers() method without setting the clientCustomerId header along with the OAuth2 credentials of your manager account. The response will contain the details of AdWords accounts accessible by the authenticated Google account, including the CustomerId

Regards,
Shwetha, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages