Verify webhook payloads when they’re using common signing methods.
These are the docs for Trigger.dev v2 which will be deprecated on January 31st, 2025. You probably want the v3 docs.
Most webhooks come with a signature in the request header. This signature is used to verify that the request is coming from the expected source. To verify you typically need to take the body of the payload, hash it and compare it with the signature in the header. You use a secret when you hash the payload to make sure that the payload hasn’t been tampered with.
When using HttpEndpoint you are required to verify the payload. verifyRequestSignature()
is a helper function that makes this easy for the majority of webhooks.
Verify webhook payloads when they’re using common signing methods.
These are the docs for Trigger.dev v2 which will be deprecated on January 31st, 2025. You probably want the v3 docs.
Most webhooks come with a signature in the request header. This signature is used to verify that the request is coming from the expected source. To verify you typically need to take the body of the payload, hash it and compare it with the signature in the header. You use a secret when you hash the payload to make sure that the payload hasn’t been tampered with.
When using HttpEndpoint you are required to verify the payload. verifyRequestSignature()
is a helper function that makes this easy for the majority of webhooks.