The community member is trying to use a webhook block to save history from a typebot in their database, but they are unable to test against a local API URL. They managed to get it working using ngrok, which forwarded to their localhost. However, they are now having an issue because the webhook is sending requests as "text/plain" instead of "application/json". Another community member suggests that the issue may be due to the body being sent in an incorrect JSON format, and the community member acknowledges their mistake, stating that they assumed the "Custom Body" was already in JSON format and just needed to add the key/value pair without brackets. The issue is now resolved.
I'm trying to use a webhook block to save history from the typebot in my database, however I can't test against a local API URL (such as http://localhost:8000/API_URL) for obvious reasons. Is there any way around this without me having to deploy my API first?
I managed to get it working via ngrok so it forwarded to my localhost. However now I am having an issue due to the webhook sending requests as "text/plain" - is there any way to configure the webhook to send application/json data instead?
You are absolutely right, silly mistake on my part. I assumed that the "Custom Body" was in JSON format already so I just added the key/value pair without brackets. Working perfectly now.