martmull
Are webhook secrets actually used? How?
I have found the documentation on signature, it is in the rest api documentation, in webhooks, here is the link for company-created webhook -> https://twenty.com/developers/rest-api/core#/webhooks/Company-Created/post
19 replies
Are webhook secrets actually used? How?
timestamp =
Date.now().toString();
(see https://github.com/twentyhq/twenty/blob/b5e6600c73492b7397b242b9b170f9d19107ef78/packages/twenty-server/src/modules/webhook/jobs/call-webhook.job.ts#L62C49-L62C71)19 replies
Are webhook secrets actually used? How?
Hey @Marian thank you for reaching us. Secret is not provided in the webhook data directly. We generate a signature (hashing webhook data, secret and timestamp) that we add to headers in
X-Twenty-Webhook-Signature
key. So to get an check your secret, you need to create the expected signature and compare it to the X-Twenty-Webhook-Signature
header value.
FYI here is the code that generates the signature -> https://github.com/twentyhq/twenty/blob/b5e6600c73492b7397b242b9b170f9d19107ef78/packages/twenty-server/src/modules/webhook/jobs/call-webhook.job.ts#L32
Hope it helps.19 replies