I have a request I'm making to the Bing Ads API that looks like this:
var _campaignManagementService = new ServiceClient<ICampaignManagementService>(
_authorizationData,
apiEnvironment
);
var getCampaignRequest = new GetCampaignsByIdsRequest
{
AccountId = <the-accountid-is-here>,
CampaignIds = new List<long>() { <the-campaignid-is-here> }
};
var getCampaignResponse = (await _campaignManagementService.CallAsync((s, r) => s.GetCampaignsByIdsAsync(r), getCampaignRequest));
When I run this, an exception is thrown on the last line that reports:
"Invalid client data. Check the SOAP fault details for more information."
Unfortunately, using the API, I'm not seeing the details of the actual response. Is there a way to get at this info? (Short of rewriting the whole thing without using the API?)
Edit:
Thanks to Panagiotis Kanavos I found the solution i think. This is for a different api (reporting) but it should look the same.
The exception has an
InnerExceptionthat is of typeSystem.ServiceModel.FaultException<Microsoft.BingAds.V13.Reporting.AdApiFaultDetail>or something similar. This has theDetailproperty with additional information:Original post:
Can't seem to be able to easily inspect the SOAP request. But you can sniff the request with Fiddler classic The classic version is free.