Agent skill

Sendbird Webhooks Skill

Receive and verify Sendbird Chat webhooks. Use when setting up Sendbird webhook handlers, debugging x-sendbird-signature verification, or handling events like group_channel:message_send, group_channel:create, group_channel:join, open_channel:message_send, or user:block.

Install this skill

npx skills add hookdeck/webhook-skills --skill sendbird-webhooks


When to Use This Skill

  • How do I receive Sendbird webhooks?
  • How do I verify the x-sendbird-signature header?
  • Why is my Sendbird webhook signature verification failing (master vs secondary API token, raw body)?
  • How do I handle group_channel:message_send or user:block events?

Verification (core)

Sendbird sends x-sendbird-signature: the hex HMAC-SHA256 of the raw body, keyed with the application's master API token (secondary API tokens don't work). Use x-sendbird-signature, not the legacy x-signature, which breaks on non-ASCII bodies. The master token is a full-access credential: keep it server-side only.

const crypto = require('crypto');

function verify(rawBody, signatureHeader, apiToken) {
  if (!signatureHeader || !apiToken) return false;
  const expected = crypto.createHmac('sha256', apiToken).update(rawBody).digest('hex');
  const received = Buffer.from(signatureHeader.trim().toLowerCase());
  const expectedBuf = Buffer.from(expected);
  return received.length === expectedBuf.length && crypto.timingSafeEqual(received, expectedBuf);
}

In Express read the body with express.raw({ type: '*/*' }) so any content type verifies.

For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.

Common Event Types

The event type is the category field in the JSON body.

CategoryDescription
group_channel:message_sendMessage sent in a group channel
group_channel:createGroup channel created
group_channel:joinUser joins a group channel
group_channel:leaveUser leaves a group channel
open_channel:message_sendMessage sent in an open channel
user:blockUser blocks another user
user:unblockUser unblocks another user

See references/overview.md for the full category list.

Important Headers

HeaderDescription
x-sendbird-signatureHex HMAC-SHA256 of the raw body (use this)
x-signatureLegacy; mismatches on non-ASCII bodies, do not use
user-agent: SendBirdSender identification

Sendbird waits 5 seconds and retries up to three times: respond 200 fast and process asynchronously.

Environment Variables

SENDBIRD_API_TOKEN=your_master_api_token   # Dashboard > Settings > Application > General (master token, not secondary)

Local Development

# Start tunnel (no account needed)
npx hookdeck-cli listen 3000 sendbird --path /webhooks/sendbird

Reference Materials


Repository

hookdeck/webhook-skills

v0.1.0 · MIT · Updated Nov 4, 2026

View on GitHub →