AuthenticationTokenExpired error

Rubin 0 Reputation points
2023-10-20T18:38:48.6733333+00:00

When attempting the ApplyOfflineConversions request, we keep receiving the AuthenticationTokenExpired error - "Authentication token expired. Please renew it or obtain a new token".

Other calls, such as those to create a conversion goal within the same account and using the same token, are successful.

We're doing a POST to https://campaign.api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v13/CampaignManagementService.svc with the header SOAPAction set to ApplyOfflineConversions and the XML below (sensitive info removed). The response is the same through our code and POSTMAN.

<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/CampaignManagement/v13">
<Action mustUnderstand="1">ApplyOfflineConversions</Action>
<AuthenticationToken>{TOKEN}</AuthenticationToken>
<CustomerAccountId i:nil="false">{CAID}</CustomerAccountId>
<CustomerId i:nil="false">{CID}</CustomerId>
<DeveloperToken>{DEVTOKEN}</DeveloperToken>
</s:Header>
<s:Body><ApplyOfflineConversionsRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<OfflineConversions i:nil="false"><OfflineConversion>
<ConversionCurrencyCode i:nil="false">USD</ConversionCurrencyCode>
<ConversionName i:nil="false">{CONVERSION_NAME}</ConversionName>
<ConversionTime>2023-10-19T11:58:01Z</ConversionTime>
<MicrosoftClickId i:nil="false">{MSCLKID}</MicrosoftClickId>
</OfflineConversion>
</OfflineConversions>
</ApplyOfflineConversionsRequest></s:Body>
</s:Envelope>

Any ideas?

Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
401 questions
Microsoft Advertising
Microsoft Advertising
A platform for Microsoft's advertising efforts designed to manage all advertising and reporting for partner advertisers. Previously known as Bing Ads and adCenter.
59 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Rubin 0 Reputation points
    2023-10-24T15:09:02.01+00:00

    We were able to solve this by including the scope parameter in the request to refresh the token, set to "offline access https://ads.microsoft.com/msads.manage". It would have been helpful to get a message regarding the token's scope rather than simply indicating that it's expired.

    0 comments No comments