Closed BryanYeh closed 1 year ago
I found the issue, I forgot to replace CampaignPerformanceReportRequest
with AdPerformanceReportRequest
try {
// setup service client
$serviceClient = (new ServiceClient(ServiceClientType::ReportingVersion13, $this->authorizationData, ApiEnvironment::Production));
$encodedReport = new SoapVar($report, SOAP_ENC_OBJECT, 'CampaignPerformanceReportRequest', $serviceClient->GetNamespace());
$request = new SubmitGenerateReportRequest();
$request->ReportRequest = $encodedReport;
$reportRequestId = $serviceClient->GetService()->submitGenerateReport($request)->ReportRequestId;
Log::info('got a report id: ' . $reportRequestId);
return $reportRequestId;
}
I am trying to get a report of all my ads in a report, so I am using
AdPerformanceReportRequest
. In the report columns, i want to includeAdPerformanceReportColumn::AdTitle
, but it seems to be getting an exception and not sure what to do.This is the error I am getting:
The code snippet of how it's setup.