Webhooks: Troubleshooting and FAQ
If you’re a developer and you’ve set up your webhooks already, you can find the answers to some of the most common questions asked about this feature here. Read on to find out more.
- Can I modify or add a token to the webhook payload?
- How are Yes/No answers represented in a webhook or response API request payload?
- Why do I sometimes see duplicated webhooks?
- How can I secure my webhooks?
- Why am I getting a "local error: tls: no renegotiation" webhook error?
- Do you support mTLS webhooks?
Can I modify or add a token to the webhook payload?
No, we do not offer any customization or modification to our webhooks.
If you want to add a token or other data to the header or the payload of a webhook, you’ll have to use a Middleware with your own custom function and scripts.
You can do the following:
1. Set up the typeform webhook to send the payload to your own URL or application.
2. Modify or add the data you need using your own code or scripts.
3. Pass this modified data or payload using your own setup to the webhooks service of your database or CRM.
How are answers to Yes/No questions represented in a webhook or response API request payload?
The answer to a Yes/No question is represented as a true or false Boolean value in the webhook or response API payload.
For example:
{
"type": "boolean",
"boolean": true,
"field": {
"id": "HHHNygr5VzSi",
"type": "yes_no",
"ref": "Yes_or_No_Question"
}
},
Why do I sometimes see duplicated webhooks?
To avoid any data loss, we aim to guarantee a delivery at least once a day with our webhooks. Our policy is that it's better to deliver webhooks twice, than not deliver them at all.
When our delivery is not confirmed in due time with an HTTP 200 response code, another webhook will be sent to ensure that your entries are delivered properly.
This can cause some duplicates, but you can identify a duplicate or a re-sent entry by comparing the token sent with your submissions. We're working on making further enhancements to our platform to limit these types of responses, however, to ensure that your submissions reach you, you might still see re-sent submissions.
How can I secure my webhooks?
You might run into a common issue with this feature when you’re trying to test a script without using a real payload.
For this to work, the tests need to be done with the real payload sent to the server and not by copying and pasting the body of the call and testing it somewhere else.
If you’re developing in a local environment, you can use a tool like ngrok to test your script.
Here are some examples you can use to secure your webhooks:
- NodeJS: Glitch
- PHP: Stack Overflow
- Java: CodePile
- Python: CodePile
- C#: Stack Overflow
Please note that these examples are not guaranteed to work and we can't provide support for them. They should be used as general guidelines and adjusted to your application environment.
To avoid a known Java webhooks issue, make sure that your body payload is passed as a string and not as an object. If you pass it as an object or array it will fail.
public void saveFormResponse(@RequestHeader("Typeform-Signature") String signature,
@RequestBody String payload) throws Exception {
userService.saveFormResponse(signature, payload);
}
Where can I find the custom reference fields to the answer choices of multiple choice questions in the webhook payload?
Unfortunately, neither our responses API nor webhooks API includes the reference to the choices in the multiple choice answer object. They only contain the reference to the question itself.
Why am I getting a "local error: tls: no renegotiation" webhook error?
Due to security reasons, our servers do not allow SSL renegotiation. To get rid of this error, you must remove the renegotiation settings of your webhook URL.
Do you support mTLS webhooks?
No, currently we do not support Mutual TLS authentication for our webhooks.