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.
424 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
we faced the error with the code which is not listed in documentation : "Error { code: 1125, errorCode: null, message: The specified customer life cycle status is invalid or not supported. }" when trying to fetch accounts info via Bing Ads API:
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/Customer/v13">
<AuthenticationToken>***</AuthenticationToken>
<DeveloperToken>***</DeveloperToken>
</s:Header>
<s:Body>
<GetAccountsInfoRequest xmlns="https://bingads.microsoft.com/Customer/v13"/>
</s:Body>
</s:Envelope>
' -H 'SOAPAction: GetAccountsInfo' -H 'Content-Type: text/xml' -A 'Jersey/2.31' 'https://clientcenter.api.bingads.microsoft.com/Api/CustomerManagement/v13/CustomerManagementService.svc'
What can be a cause of such error?
Solved it by adding the optional (?!) request body element CustomerId.
You can obtain the CustomerId by querying GetUser.