I'm trying to get list of all accounts im MMC account.
{'downloadFormat': 'CSV', 'reportType': 'ACCOUNT_PERFORMANCE_REPORT', 'selector': {'fields': ['AccountCurrencyCode', 'AccountDescriptiveName', 'AccountTimeZone', 'CanManageClients', 'CustomerDescriptiveName', 'ExternalCustomerId', 'IsAutoTaggingEnabled', 'IsTestAccount']}, 'dateRangeType': 'LAST_30_DAYS', 'reportName': 'ACCOUNT_PERFORMANCE_REPORT'}
2017-09-07 15:02:07,762 Request Summary: {'isError': True, 'errorMessage': b'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><reportDownloadError><ApiError><type>AuthenticationError.CLIENT_CUSTOMER_ID_INVALID</type><trigger><null></trigger><fieldPath></fieldPath></ApiError></reportDownloadError>', 'includeZeroImpressions': 'True', 'skipReportHeader': 'True', 'clientCustomerId': 'None', 'server': '
adwords.google.com', 'skipColumnHeader': 'False', 'skipReportSummary': 'True'}
Traceback (most recent call last):
File "/adwords/venv/lib/python3.5/site-packages/googleads/adwords.py", line 1602, in _DownloadReportAsStream
response = self.url_opener.open(request)
File "/usr/lib/python3.5/urllib/request.py", line 472, in open
response = meth(req, response)
File "/usr/lib/python3.5/urllib/request.py", line 582, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.5/urllib/request.py", line 510, in error
return self._call_chain(*args)
File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
result = func(*args)
File "/usr/lib/python3.5/urllib/request.py", line 590, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "adwords_report_test.py", line 751, in <module>
main()
File "adwords_report_test.py", line 43, in with_profiling
ret = fn(*args, **kwargs)
File "adwords_report_test.py", line 742, in main
data = ReportLoader.load_accountPerformance()
File "adwords_report_test.py", line 43, in with_profiling
ret = fn(*args, **kwargs)
File "adwords_report_test.py", line 331, in load_accountPerformance
return ReportLoader._download_report(selector, report_type, date_range)
File "adwords_report_test.py", line 200, in _download_report
skip_report_summary=True, include_zero_impressions=include_zero_impressions)
File "/adwords/venv/lib/python3.5/site-packages/googleads/adwords.py", line 1275, in DownloadReport
output, **kwargs)
File "/adwords/venv/lib/python3.5/site-packages/googleads/adwords.py", line 1545, in _DownloadReport
response = self._DownloadReportAsStream(post_body, **kwargs)
File "/adwords/venv/lib/python3.5/site-packages/googleads/adwords.py", line 1618, in _DownloadReportAsStream
raise self._ExtractError(e)
googleads.errors.AdWordsReportError: AdWords report download failed with HTTP status code: 400
When i specified CUSTOMER_ID I can download ACCOUNT_PERFORMANCE_REPORT but just for specified customer not for all of them.