Debug WebHook Response (JSON)


I have set up a webhook. The request type is “form” and sends these form fields.

  "device_id": "{{SPARK_CORE_ID}}",
  "temp": "{{t}}"

I have set the headers to include:

  "Content-Type": "application/json",
  "Accept": "application/json"

The response is to call another third party webhook and this is indicating it receives the following payload:


This does not look like json and in fact the callback fails with “Couldn’t parse payload into json, leaving as string”

The Particle console does a great job of providing e.g. the data that initiated the particle webhook call, and much of the data sent to the request webhook url, but it does not show the payload (i.e. is it being sent as json?).

Question 1- any suggestions on how to capture exactly what is being sent to the request URL (other than create a dummy proxy url to send to)

Question 2 - Given the post sample above and the request headers set to json, should this guarantee the post data is being sent as json?

Thank you in advance.

If you’re using “form” in your webhook definition, the data is sent as application/x-www-form-urlencoded data, not as JSON. You need to use the key “json” instead of “form” to send the body as JSON.

This document has some more tips that may be helpful, including debugging the payload data using request bin:


Of course, select JSON!. I copied an original json based webhook created using the CLI, prior to the Web IDE offering. When this original code is viewed in the IDE it indicates the request type is FORM. Thank you for the prompt response.