Hello,
I am trying to pull spend for all accounts underneath our business account. I have achieved this by pulling all account ids using an altered getAccountHierarchy.php (which now just finds all of the sub accounts ids), and then using altered DownloadCriteriaReportWithAwql.php (which I then set the customer ID using withClientCustomerId().
This is working well except one ad account. For one of the accounts I get the following error:
[2019-09-10 19:35:18] AW_REPORT_DOWNLOADER.WARNING: clientCustomerId=********** unknown (AwApi-PHP, googleads-php-lib/43.0.0, PHP/7.2.19-0ubuntu0.18.04.2, GuzzleHttp/6.3.3, curl/7.58.0, ReportQueryBuilder) "POST /api/adwords/reportdownload/v201809 HTTP/1.1" Status: 400
[2019-09-10 19:35:18] AW_REPORT_DOWNLOADER.NOTICE: Request:
POST /api/adwords/reportdownload/v201809 HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: adwords.google.com
Authorization: REDACTED
developerToken: REDACTED
clientCustomerId: **********
User-Agent: unknown (AwApi-PHP, googleads-php-lib/43.0.0, PHP/7.2.19-0ubuntu0.18.04.2, GuzzleHttp/6.3.3, curl/7.58.0, ReportQueryBuilder)
skipReportHeader: false
skipColumnHeader: false
skipReportSummary: false
useRawEnumValues: false
includeZeroImpressions: false
__rdquery=SELECT CampaignName, AdGroupName, Id, CampaignId, AdGroupId, Id, Impressions, Clicks, Cost, CreativeFinalUrls, Conversions FROM AD_PERFORMANCE_REPORT WHERE Status IN ['ENABLED', 'PAUSED'] DURING 20190909, 20190909&__fmt=3073797012
Response:
REDACTED REPORT DATA
--------
Error:
Client error: `POST https://adwords.google.com/api/adwords/reportdownload/v201809` resulted in a `400 Bad Request` response
This account number does in fact exist. And it exists underneath our buainess manager. Why can I not pull a report for this account?
Lucy