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.
402 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello team!
We always get errors when trying to DownloadCampaignsByAccountIdsRequest for one specific account.
Here is the request
curl -X POST --data '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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">
<AuthenticationToken>_EDITED_</AuthenticationToken>
<CustomerAccountId>141336357</CustomerAccountId>
<DeveloperToken>_EDITED_</DeveloperToken>
</s:Header>
<s:Body>
<DownloadCampaignsByAccountIdsRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<AccountIds xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a1:long>141336357</a1:long>
</AccountIds>
<DataScope>EntityData</DataScope>
<DownloadEntities>
<DownloadEntity>AdGroupLabels</DownloadEntity>
<DownloadEntity>AdGroups</DownloadEntity>
<DownloadEntity>Ads</DownloadEntity>
<DownloadEntity>AppInstallAdLabels</DownloadEntity>
<DownloadEntity>Budgets</DownloadEntity>
<DownloadEntity>CampaignLabels</DownloadEntity>
<DownloadEntity>Campaigns</DownloadEntity>
<DownloadEntity>DynamicSearchAdLabels</DownloadEntity>
<DownloadEntity>ExpandedTextAdLabels</DownloadEntity>
<DownloadEntity>KeywordLabels</DownloadEntity>
<DownloadEntity>Keywords</DownloadEntity>
<DownloadEntity>Labels</DownloadEntity>
<DownloadEntity>ProductAdLabels</DownloadEntity>
<DownloadEntity>ResponsiveAdLabels</DownloadEntity>
<DownloadEntity>ResponsiveSearchAdLabels</DownloadEntity>
<DownloadEntity>TextAdLabels</DownloadEntity>
</DownloadEntities>
<DownloadFileType>Csv</DownloadFileType>
<FormatVersion>6.0</FormatVersion>
<LastSyncTimeInUTC>2023-07-07T13:06:52Z</LastSyncTimeInUTC>
</DownloadCampaignsByAccountIdsRequest>
</s:Body>
</s:Envelope>
' -H 'SOAPAction: DownloadCampaignsByAccountIds' -H 'Content-Type: text/xml' -A 'Jersey/2.39' 'https://bulk.api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v13/BulkService.svc'
Response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:TrackingId xmlns:h="https://bingads.microsoft.com/CampaignManagement/v13">16bd4030-de82-42d1-90b4-e118bfe4a38a</h:TrackingId>
</s:Header>
<s:Body>
<DownloadCampaignsByAccountIdsResponse xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<DownloadRequestId>1308198887615</DownloadRequestId>
</DownloadCampaignsByAccountIdsResponse>
</s:Body>
</s:Envelope>
Trying to GetBulkDownloadStatusRequest
curl -X POST --data '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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">
<AuthenticationToken>_EDITED_</AuthenticationToken>
<CustomerAccountId>141336357</CustomerAccountId>
<DeveloperToken>_EDITED_</DeveloperToken>
</s:Header>
<s:Body>
<GetBulkDownloadStatusRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<RequestId>1308198887615</RequestId>
</GetBulkDownloadStatusRequest>
</s:Body>
</s:Envelope>
' -H 'SOAPAction: GetBulkDownloadStatus' -H 'Content-Type: text/xml' -A 'Jersey/2.39' 'https://bulk.api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v13/BulkService.svc'
Response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:TrackingId xmlns:h="https://bingads.microsoft.com/CampaignManagement/v13">86aeb197-72a3-4523-a006-d4c1e9161793</h:TrackingId>
</s:Header>
<s:Body>
<GetBulkDownloadStatusResponse xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<Errors xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<OperationError>
<Code>0</Code>
<Details i:nil="true"/>
<ErrorCode>InternalError</ErrorCode>
<Message>An internal error has occurred.</Message>
</OperationError>
</Errors>
<ForwardCompatibilityMap xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
<PercentComplete>1</PercentComplete>
<RequestStatus>Failed</RequestStatus>
<ResultFileUrl i:nil="true" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
</GetBulkDownloadStatusResponse>
</s:Body>
</s:Envelope>
Why does the error occur?