validateWebhookSignature
Verify that an inbound request was genuinely signed by SignalWire. This is the primary entry point for webhook signature validation. Compute it over the raw request body before any JSON or form parsing.
rawBody must be the raw request body as a UTF-8 string. Passing a parsed
object throws a TypeError. For pre-parsed form params, use
validateRequest() instead.
Parameters
signingKey
Your SignalWire Signing Key. An empty or non-string value throws an Error.
signature
The signature header value (X-SignalWire-Signature or X-Twilio-Signature).
A missing or empty value returns false.
url
The full URL SignalWire POSTed to.
rawBody
The raw request body as a UTF-8 string, before JSON or form parsing.
Returns
boolean — true when the signature matches; false otherwise. The
comparison is constant-time.