Error code 0 Internal Error on AddConversionGoal SOAP call

Guga Figueiredo 5 Reputation points
2025-01-10T16:59:15.5066667+00:00

I am trying to create conversion goals through an integration with Microsoft Advertising API, following the documentation found here: https://learn.microsoft.com/en-us/advertising/campaign-management-service/addconversiongoals?view=bingads-13&tabs=prod&pivots=soap

and per the example: https://learn.microsoft.com/en-us/advertising/guides/code-example-offline-conversions?view=bingads-13

However I keep getting internal error response with error code 0

request xml envelope looks like:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
        <AuthenticationToken xmlns="https://bingads.microsoft.com/CampaignManagement/v13">eyJh****</AuthenticationToken>
        <DeveloperToken xmlns="https://bingads.microsoft.com/CampaignManagement/v13">110W****</DeveloperToken>
        <CustomerAccountId xmlns="https://bingads.microsoft.com/CampaignManagement/v13">251244157</CustomerAccountId>
        <CustomerId xmlns="https://bingads.microsoft.com/CampaignManagement/v13">180310586</CustomerId>
    </soap:Header>
    <soap:Body>
        <AddConversionGoalsRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
            <ConversionGoals>
                <ConversionGoal>
                    <ConversionWindowInMinutes>129600</ConversionWindowInMinutes>
                    <CountType>All</CountType>
                    <GoalCategory>Other</GoalCategory>
                    <Name>My Test Goal</Name>
                    <Revenue>
                        <Type>VariableValue</Type>
                    </Revenue>
                    <Scope>Account</Scope>
                    <Status>Active</Status>
                    <Type>OfflineConversion</Type>
                </ConversionGoal>
            </ConversionGoals>
        </AddConversionGoalsRequest>
    </soap:Body>
</soap:Envelope>

this is the response body:

HTTP/1.1 200 OK
Content-Length: 676
Connection: keep-alive
Content-Type: text/xml; charset=utf-8
Date: Fri, 10 Jan 2025 09:56:27 GMT
Server: Kestrel
X-Ms-Requestid: a4ecabfe-80f9-4a50-a01f-46135cd628a8
X-Ms-Trackingid: a4ecabfe-80f9-4a50-a01f-46135cd628a8

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
        <s:Fault>
            <faultcode>s:Client</faultcode>
            <faultstring xml:lang="en-US">Invalid client data. Check the SOAP fault details for more information.
                TrackingId: a4ecabfe-80f9-4a50-a01f-46135cd628a8.
            </faultstring>
            <detail>
                <AdApiFaultDetail xmlns="https://adapi.microsoft.com"
                                  xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                    <TrackingId>a4ecabfe-80f9-4a50-a01f-46135cd628a8</TrackingId>
                    <Errors>
                        <AdApiError>
                            <Code>0</Code>
                            <Detail i:nil="true"/>
                            <ErrorCode>InternalError</ErrorCode>
                            <Message>An internal error has occurred.</Message>
                        </AdApiError>
                    </Errors>
                </AdApiFaultDetail>
            </detail>
        </s:Fault>
    </s:Body>
</s:Envelope>

I can use same credentials for Getting User, getting Account by UserId and Getting account Info, but it keeps failing for conversionGoals

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.
441 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.