Skip to main content
Every webhook delivery is signed. Verify the signature before acting on a payload — an unverified webhook endpoint can be called by anyone who finds its URL.

How it works

Each delivery carries an X-Get2Dial-Signature header in the form:
t is the Unix timestamp the request was signed at. v1 is an HMAC-SHA256 signature, hex encoded, computed over <timestamp>.<raw request body>, keyed with your webhook’s signing secret.
Get2Dial does not enforce a timestamp tolerance window on its side. If you need replay protection, check that t is recent yourself and reject deliveries outside the window you choose — this is on you to implement, not something the signature check does for you.

Steps

Always compare signatures in constant time — both examples above do this (crypto.timingSafeEqual, hmac.compare_digest) rather than === or ==, which leaks timing information an attacker can use to guess the signature byte by byte.

Verify

Send yourself a test event and confirm your verification function returns true for a genuine delivery and false for a payload you’ve tampered with.

Common problems

  • Verification always fails. Confirm you’re signing the raw request body — not a re-serialized version of the parsed JSON, which can differ in whitespace or key order and produce a different signature.
  • You need replay protection. Implement your own timestamp-freshness check against t — it isn’t enforced by Get2Dial.

Next steps

Webhooks overview

Event catalog