Bing Ads API PollGenerateReport 下载 URL 显示“ResourceNotFound”

问题描述 投票:0回答:1

有点坚持这个。我能够使用 GeographicalPerformanceReportRequest 的“SubmitGenerateReport”API 请求报告,并且它以报告 ID 进行响应。附上我使用 Postman 从 API 调用中得到的响应。

SubmitGenerateReport Response

同时附上 API 请求。

<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header xmlns="https://bingads.microsoft.com/Reporting/v13">
    <AuthenticationToken i:nil="false">tokenhere</AuthenticationToken>
    <Action mustUnderstand="1">SubmitGenerateReport</Action>
    <CustomerAccountId i:nil="false">accountID here</CustomerAccountId>
    <CustomerId i:nil="false">customerId here</CustomerId>
    <DeveloperToken i:nil="false">Developer token here</DeveloperToken>
  </s:Header>
  <s:Body>
    <SubmitGenerateReportRequest xmlns="https://bingads.microsoft.com/Reporting/v13">
      <ReportRequest i:nil="false" i:type="GeographicPerformanceReportRequest">
        <Format i:nil="false">Csv</Format>
        <ReportName i:nil="false">reportName1</ReportName>
        <!--These fields are applicable if the derived type attribute is set to AccountPerformanceReportRequest-->
        <Aggregation>Summary</Aggregation>
        <Columns i:nil="false">
          <GeographicPerformanceReportColumn>CampaignName</GeographicPerformanceReportColumn>
          <GeographicPerformanceReportColumn>Ctr</GeographicPerformanceReportColumn>
          <GeographicPerformanceReportColumn>Spend</GeographicPerformanceReportColumn>
        </Columns>
        <Scope i:nil="false">
          <AccountIds i:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <a1:long>accountID here</a1:long>
          </AccountIds>
        </Scope>
        <Time i:nil="false">
          <PredefinedTime i:nil="false">Last30Days</PredefinedTime>
          <ReportTimeZone i:nil="false">EasternTimeUSCanada</ReportTimeZone>
        </Time>
      </ReportRequest>
    </SubmitGenerateReportRequest>
  </s:Body>
</s:Envelope>

当我传递从 SubmitGenerateReport API 获得的报告 ID 时,我从 PollGenerateReport API 获得了如下的下载 URL。

Response from PollGenerateReport

PollGenerateReport 的有效负载

<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header xmlns="https://bingads.microsoft.com/Reporting/v13">
    <Action mustUnderstand="1">PollGenerateReport</Action>
    <AuthenticationToken i:nil="false">token here</AuthenticationToken>
    <CustomerAccountId i:nil="false">accountId here</CustomerAccountId>
    <CustomerId i:nil="false">customer Id here</CustomerId>
    <DeveloperToken i:nil="false">Developer token here</DeveloperToken>
  </s:Header>
  <s:Body>
    <PollGenerateReportRequest xmlns="https://bingads.microsoft.com/Reporting/v13">
      <ReportRequestId i:nil="false">1171543907220_1694422237806</ReportRequestId>
    </PollGenerateReportRequest>
  </s:Body>
</s:Envelope>

但是,当我尝试使用提供的 URL 下载报告时,它显示“资源未找到”错误并抛出以下错误。

指定的资源不存在

Download URL Response

我错过了什么吗?任何线索表示赞赏。短暂性脑缺血发作。

soap postman bing-api bing-ads-api
1个回答
0
投票

我刚刚得到了同样的回复,它可能会对将来的某人有所帮助。

获取ReportDownloadUrl值时,需要先将

&amp;
替换为
&
。然后使用 URL 下载 zip 文件。

© www.soinside.com 2019 - 2024. All rights reserved.