python - adwords api and MCC account and how to add customer ID in report -
i using python adwords api v201402.
i have mcc account.
report_downloader = self.client.getreportdownloader(version='v201402') # create report definition. report = { 'reportname': 'last 7 days criteria_performance_report', 'daterangetype': 'last_7_days', 'reporttype': 'criteria_performance_report', 'downloadformat': 'csv', 'selector': { 'fields': ['campaignid', 'adgroupid', 'id', 'criteriatype', 'criteria', 'impressions', 'clicks', 'cost'] }, # enable rows 0 impressions. 'includezeroimpressions': 'false' } if dont add customer id below error: output, return_money_in_micros) file "/usr/local/lib/python2.7/dist-packages/googleads-1.0.1-py2.7.egg/googleads/adwords.py", line 406, in _downloadreport raise self._extracterror(e) googleads.errors.adwordsreportbadrequesterror: type: authenticationerror.client_customer_id_invalid trigger: <null> field path: none
how add customer id? tried adding 'clientcustomerid':"xxx-xxx-xxx" in hash below:
file "/usr/local/lib/python2.7/dist-packages/suds_jurko-0.6-py2.7.egg/suds/mx/core.py", line 71, in append if self.start(content): file "/usr/local/lib/python2.7/dist-packages/suds_jurko-0.6-py2.7.egg/suds/mx/literal.py", line 86, in start raise typenotfound(content.tag) suds.typenotfound: type not found: 'clientcustomerid'
the clientcustomerid
set within api client object.
depending on goals, should either set value in config file, or in client
method.
Comments
Post a Comment