Error 400 on API request?

Hello,

In the last 2 or 3 weeks I’ve started seeing a new error coming back from some Pipedrive API endpoints:

"While requesting “dev_method” from Pipedrive we ran into an error: Got 400 - <?xml version="1.0" encoding="UTF-8"?>"

I can’t figure out what has changed or what is going wrong here. Is anyone familiar with what might cause this kind of error?

Thanks,

Dan

Hi Dan,

Could you let me know what endpoints you’re using to return this error?

It’s strange because I found another error message that goes along with this:

Error Code = MalformedPOSTRequest
Message = The body of your POST request is not well-formed multipart/form-data.
RequestId = 58F6EF02E493DF36
HostID = 5E+G4pCOXqadAV/pYz1clcTfOVMXHJYlTo9s22YaYawLBJTgZ5/0X9IxOjQC80rinmI6LBv9Cqg="

But in this case there were no POST requests to Pipedrive. The only API call was a DELETE request to the “Delete an Activity” endpoint: https://developers.pipedrive.com/docs/api/v1/#!/Activities/delete_activities_id

And here is the code for that request:

var endpoint = pipedriveURL + "activities?ids=" + activityID + "&api_token=" + pipedriveAPIKey;

var res = await fetch(endpoint, {method: 'DELETE'});
var resBody = await res.json();