Bing Ads API - GetLabelAssociationsByEntityIds - UserIsNotAuthorized 106

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

当我尝试获取与 CampaignId 相关的标签时,出现

The user does not represent a authorized developer.
错误

调试:suds.client:发送到(https://campaign.api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v13/CampaignManagementService.svc

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="https://bingads.microsoft.com/CampaignManagement/v13" xmlns:ns0="https://bingads.microsoft.com/CampaignManagement/v13" xmlns:ns1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header>
    <tns:AuthenticationToken>
        TOKEN
    </tns:AuthenticationToken>
    <tns:CustomerAccountId>ACCOUNT_ID</tns:CustomerAccountId>
    <tns:CustomerId>PATENT_ID</tns:CustomerId>
    <tns:DeveloperToken>DEVELOPER_TOKEN</tns:DeveloperToken>
  </SOAP-ENV:Header>
  <ns2:Body>
    <ns0:GetLabelAssociationsByEntityIdsRequest>
      <ns0:EntityIds>
        <ns1:long>CAMPAIGN_ID</ns1:long>
        <ns1:long>CAMPAIGN_ID</ns1:long>
        <ns1:long>CAMPAIGN_ID</ns1:long>
        <ns1:long>CAMPAIGN_ID</ns1:long>
        <ns1:long>CAMPAIGN_ID</ns1:long>
        <ns1:long>CAMPAIGN_ID</ns1:long>
      </ns0:EntityIds>
      <ns0:EntityType>Campaign</ns0:EntityType>
    </ns0:GetLabelAssociationsByEntityIdsRequest>
  </ns2:Body>
</SOAP-ENV:Envelope>

我使用 bingads.v13 python 库,看起来像这样

campaign_service = ServiceClient(service='CampaignManagementService', version=13, authorization_data=authorization_data, environment='production')
get_label_associations_by_entity_ids = campaign_service.GetLabelAssociationsByEntityIds(
                EntityIds={'long': get_entity_ids},
                EntityType='Campaign'
            )

回复:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body>
    <s:Fault>
      <faultcode>s:Server</faultcode>
      <faultstring xml:lang="en-US">Invalid client data. Check the SOAP fault details for more information. TrackingId: 3511ac9a-a751-4c0d-9b51-1ed04540a225.</faultstring>
      <detail>
        <ApiFaultDetail xmlns="https://bingads.microsoft.com/CampaignManagement/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
          <TrackingId xmlns="https://adapi.microsoft.com">3511ac9a-a751-4c0d-9b51-1ed04540a225</TrackingId>
          <BatchErrors />
          <OperationErrors>
            <OperationError><Code>106</Code>
              <Details i:nil="true" />
              <ErrorCode>UserIsNotAuthorized</ErrorCode>
              <Message>The user does not represent a authorized developer.</Message>
            </OperationError>
          </OperationErrors>
        </ApiFaultDetail>
      </detail>
    </s:Fault>
  </s:Body>
</s:Envelope>
bing bing-ads-api
1个回答
0
投票

Microsoft Ads 支持回复称这是一个 IBM 错误。:

我向您发送此信息是为了向您提供有关您对 API 遇到的错误的担忧的最新信息。我已先与我们的后端团队协调,我们想进一步确认您对该帐户拥有何种访问权限。 检查此处后,您必须是该帐户的超级管理员。您可以按照此处的步骤请求新令牌。我希望这有帮助。

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