我正在尝试下载 Bing ads 用户位置性能报告。
我的 php 代码是:
define("ADCENTER_API_ENDPOINT", "https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/v13");
define("ADCENTER_API_NAMESPACE", "https://bingads.microsoft.com/Reporting/v13");
define("ADCENTER_API_REPORT_SERVICE", ADCENTER_API_ENDPOINT . "/ReportingService.svc?wsdl");
try {
$headers = array(
new SoapHeader(ADCENTER_API_NAMESPACE, 'DeveloperToken', DEVELOPER_TOKEN, false),
new SoapHeader(ADCENTER_API_NAMESPACE, 'AuthenticationToken', $access_token, false),
new SoapHeader(ADCENTER_API_NAMESPACE, 'CustomerAccountId', CUSTOMER_ACCOUNT_ID, false),
new SoapHeader(ADCENTER_API_NAMESPACE, 'CustomerId', CUSTOMER_ID, false),
new SoapHeader(ADCENTER_API_NAMESPACE, 'Password', USER_PASS, false),
new SoapHeader(ADCENTER_API_NAMESPACE, 'UserName', USER_EMAIL, false)
);
$request = array(
"Format" => 'Csv',
"ReportName" => 'UserLocationPerformanceReport',
"Aggregation" => 'Hourly',
"Columns" => array('CampaignName','CampaignStatus','Country','LocationId','TimePeriod','AccountName','Ctr','Spend','AverageCpc'),
"Scope" => array('AccountIds' => [CUSTOMER_ACCOUNT_ID]),
"Time" => array('PredefinedTime' => 'Today')
);
我也在列数组中包含了所有必需的列。我的刷新令牌和访问令牌已生成,API 正在为身份验证提供正确的响应。
为什么它显示错误。谁能帮我 ?
宝慕林4294392
斯蒂芬大帝