Error "Invalid client data. Check the SOAP fault details for more information" When Submitting Offline Conversions

涼一 射場 0 Reputation points
2024-05-10T08:07:54.0133333+00:00

Hi,

I've been trying to submit offline conversions using the Bing Ads API, but I encounter the error "Invalid client data. Check the SOAP fault details for more information" every time I try to do so.

I am using the parameters as described in the official documentation here: Code Example: Offline conversions.

Additionally, I have a question about the MicrosoftClickId:

  • Does the system only accept MicrosoftClickId values that have been actually issued? I'm wondering if this might be a part of my problem.

Could you provide any insight into why this error might be occurring and how to resolve it? Any advice would be greatly appreciated.

Thank you!

$wsdl = 'https://campaign.api.sandbox.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v13/CampaignManagementService.svc?wsdl';

$client = new SoapClient($wsdl, [
    'trace' => 1,
    'exceptions' => true
]);


$headers = [
    new SoapHeader('https://bingads.microsoft.com/CampaignManagement/v13', 'DeveloperToken', $developerToken),
    new SoapHeader('https://bingads.microsoft.com/CampaignManagement/v13', 'CustomerId', $customerId),
    new SoapHeader('https://bingads.microsoft.com/CampaignManagement/v13', 'CustomerAccountId', $accountId),
    new SoapHeader('https://bingads.microsoft.com/CampaignManagement/v13', 'AuthenticationToken', $accessToken),
];


$client->__setSoapHeaders($headers);

$conversion = new OfflineConversion();
$conversion->ConversionName = 'Conversion';
$conversion->ConversionTime = '2024-05-05T09:28:41Z';
$conversion->ConversionValue = 5.0;
$conversion->MicrosoftClickId = 'f894f652ea334e739002f7167ab8f8e3';
$conversion->ConversionCurrencyCode = 'USD';

$request = new ApplyOfflineConversionsRequest();
$request->OfflineConversions = [$conversion];


// Call the API method
$result = $client->ApplyOfflineConversions($request);
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.
393 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.
55 questions
0 comments No comments
{count} votes