ipappi-7678 avatar image
0 Votes"
ipappi-7678 asked

BingAds-Python-SDK: Invalid client data soap


The following error came up while trying to retrieve campaigns using Bingads Python API (for a specific accountid and customerid, substituted with XXXX in the code snippet) :

Web service reported a SOAP processing fault using an unexpected HTTP status code 200. Reporting as an internal server error.
<suds.sax.document.Document object at 0x0000026EA74E9C08>
Server raised fault: 'Invalid client data. Check the SOAP fault details for more information. TrackingId: cc0bdf1a-095e-4448-abce-9b370f01e5be.'

The code I used to reach up to this point was the following:

Everything ran without errors and then continued to take the oauth_tokens by manual user authentication through a browser pop-up and then copying and pasting the refresh token into the system input:


So far so good, then I stored the generated refresh_token:


The error in the beginning of my message (invalid client) appeared when I ran the following snippet and the exception was triggered:


This snipped used in the background the following routines appearing below:


I can't really explain the error and the threads already posted were not very helpful in my case. I ran the script using my Microsoft account and the respective developer token as an administrator for this account. So in my case I don't think the problem is really that my user does not have enough rights for actions inside the account.
Could you please help?

PS. The final goal of my project is also to create an automation which will be triggered and run directly on the cloud to interact with Bing Ads and thus a non -manual step of acquiring the refresh token and a full authentication is needed for this. Is there a solution about this? I read the documentation quite carefully but I didn't find something relevant to what I am trying to achieve.

Thanks beforehand!

image.png (36.0 KiB)
image.png (38.4 KiB)
image.png (39.1 KiB)
image.png (9.1 KiB)
image.png (71.4 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers