<timestamp>.<raw body> with your endpoint’s
secret, compared in constant time, with a timestamp no further than five minutes from
your clock. While you rotate a secret, pass both: a delivery passes with either.
Verify the body exactly as it arrived. Parsing the JSON and writing it out again changes
the bytes, and the signature no longer matches.
TypeScript
@technicallyfit/sdk/webhooks uses only Web Crypto, so it runs in Node, edge runtimes and
workers. This handler takes a standard Request:
headers also takes a plain object such as Node’s req.headers, and rawBody takes a
string or bytes.
Python
What a failure means
Answer a delivery that fails with a
4xx and do not act on it. Deduplicate on the
TF-Webhook-Id header (the payload’s id): a delivery can arrive more than once.