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

qxsslcnc  于 2023-11-18  发布在  Postman
关注(0)|答案(1)|浏览(185)

有点卡住了。我能够使用“SubmitGenerateReport”API for GeographicalPerformanceReportRequest请求一个报告,它用一个报告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下载报告时,它说Resource not found error并抛出以下内容。

指定的资源不存在

Download URL Response
我错过什么了吗?任何线索都很感激。短暂性脑缺血。

41zrol4v

41zrol4v1#

我也有同样的React,这可能会在将来帮助到别人。
获取ReportDownloadUrl值时,需要先将&替换为&,然后使用URL下载zip文件。

相关问题