Verify HMAC signatures (hands-on)
This guide is the practical workshop for HMAC verification — write a verifier, generate signed test events with curl, break it deliberately, fix it, then point sandbox at it.
This applies to HMAC subscriptions (the default). If your subscription uses Basic auth, you validate the
Authorizationheader instead — see Authentication.
Need the reference? The full code in 6 languages (Node, Python, Java, Go, PHP, Ruby) with the framework-specific gotchas lives at Signature verification. This guide assumes you've read that or are using one of those snippets.
The contract in one paragraph
RCM signs every webhook as Base64(HMAC-SHA256(secret, "<timestamp><raw_body>")) — the X-RCM-Timestamp (ISO-8601) and the raw body are concatenated directly, no separator — and sent in the X-RCM-Signature header (raw Base64, no prefix). Reject if (1) the header is missing, (2) the timestamp is more than 5 minutes old, or (3) your recomputed HMAC doesn't match using a constant-time compare.