Getting all Accounts Information. Python API

46 views
Skip to first unread message

Fran Goitia

unread,
Jun 8, 2017, 12:00:39 PM6/8/17
to AdWords API Forum
I need to get all the accounts in my MCC. I basically need the name and ID. I'm using Python's API. I don't see how to do this in the docs and trying the example in account_management/"get_account_hierarchy.py" failed with:
suds.WebFault: Server raised fault: '[AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED @ ; trigger:'<null>']'

I'm using v201705.

Shwetha Vastrad (AdWords API Team)

unread,
Jun 8, 2017, 2:32:49 PM6/8/17
to AdWords API Forum
Hi Fran, 

This error occurs when the Client customer ID is not specified in the HTTP header. The clientCustomerId header is required for all calls to all services except CustomerService and ReportDefinitionService. You need to provide the AdWords Manager account Id in the "googleads.yaml" file and then retry the get_account_hierarchy.py example.

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