whsec_, and you find it in Settings → MCP and API → Webhooks. Both of your addresses share it: only point them at services you control.
With a library
Use any Standard Webhooks library, such as thestandardwebhooks package for Node.js or Python. In Node.js:
verify throws an error when the signature is wrong or too old.
By hand
- Verify the raw body, before parsing it.
- Reject requests whose
webhook-timestampis more than 5 minutes old.