@shortcut/client
    Preparing search index...

    Function verifyShortcutWebhookSignature

    • Verifies the deprecated body-only Payload-Signature in constant time using WebCrypto, which is available on Node.js 20+, Cloudflare Workers, Deno, and Bun. Prefer verifyShortcutWebhookHeaders, which checks Shortcut-Signature and its timestamp window. Do not use it for session events, since it would accept one replayed without Shortcut-Signature.

      Parameters

      • secret: string

        The agent app's webhook signing secret.

      • rawBody: string | Uint8Array<ArrayBufferLike>

        The exact request bytes. Passing a re-serialized string only works when it matches the original bytes, so prefer the raw body.

      • signature: string | null | undefined

        The Payload-Signature header value.

      Returns Promise<boolean>

      false for a missing, malformed, or mismatched signature.