verify_signature
Verify a webhook signature against a secret — 25 provider-exact schemes plus a generic HMAC mode, the same engine that computes ✓/✗ badges on captures. Covers HMAC-SHA256 (GitHub, Stripe, Svix/Standard Webhooks, Shopify-style base64, URL-signing Square/HubSpot/Trello…), ECDSA (SendGrid), RSA (Kick) and HMAC-MD5 (Patreon). Pass the scheme, the secret, the delivery's headers, and the BYTE-EXACT raw body (body_base64 for binary). The secret is used only for this one in-memory computation — never stored or logged. No bin needed. If verification fails, the #1 cause is a re-serialized body: point the real webhook at a capture bin (create_bin) to get the true raw bytes first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | full delivery URL — REQUIRED for square, hubspot and trello (the URL is part of the signed string) | |
| body | No | raw request body, byte-exact as the provider sent it (not re-serialized!) | |
| method | No | HTTP method of the delivery (hubspot v3 signs it; default POST) | |
| scheme | Yes | signature scheme (usually the provider name); "hmac" = generic HMAC over the raw body | |
| secret | Yes | signing secret or key exactly as the provider shows it (sendgrid/kick: the PUBLIC verification key) | |
| headers | No | the delivery's HTTP headers — at least the signature/timestamp headers; names are case-insensitive | |
| body_base64 | No | alternative to `body` for binary payloads: base64 of the raw body bytes | |
| signature_header | No | scheme "hmac" only: which header carries the signature (default x-signature) |