This topic was automatically generated from Slack. You can find the original thread here.
Elton Morais : I’m trying to create a Facebook Convervion using API. I already did that using PHP, trying just to adapt the code to nodejs, using axios, but just can’t get it to work. Receiving always error 400, without any info about the error.
Anyone here already created an nodejs that connects on Facebook Conversion API? If yes could you share what you did?
Dylan Sather (Pipedream) : It shouldn’t matter in this case, but technically axios doesn’t need the data sent in the POST request to be converted to JSON. You can just send the JavaScript object directly without the JSON.stringify().
Pravin Savkar : another user shared a workflow on Twitter that demonstrates how to integrate with the Facebook Conversions API. I haven’t tried this myself, but I’m sharing in case the example is helpful:
Here is the link to the the original Twitter thread:
A 400 error means that the data you’re sending to an external API doesn’t match what that API is expecting.
Please refer to the API’s documentation and the error message in the response from the API for more details to narrow down which part of the payload is missing or is malformed.