Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

community-webhooks

БесплатноЗапускает вложенные скриптыНе проверен

Receive and verify Community (community.com) SMS platform webhooks. Use when setting up a Community webhook handler, debugging `community-signature`…

hookdeckот hookdeck★ 104 звезды на GitHub

Об этом скилле

Community Webhooks

Webhooks from Community (community.com) — the SMS / conversational-messaging platform for brands and creators. This is not a generic community-forum product, not Circle/Discourse/Bettermode, and not Salesforce Experience Cloud. The developer hub is https://developer.community.com.

When to Use This Skill

  • How do I receive Community webhooks?
  • How do I verify the community-signature header?
  • Why is my Community webhook signature verification failing?
  • How do I handle message.inbound / message.outbound events?
  • How do I handle member.created, member.updated, member.deleted, and member.opted_out events?
  • How do I deduplicate Community webhooks (at-least-once delivery)?

Verification (core)

Community signs every request with HMAC-SHA256 over {timestamp}.{raw_body} and sends the result in a Stripe-style community-signature header:

community-signature: t=1711666033,v1=b777f6ae2497ae95e99811c88b28d8ba377c95d615905963c68fae4c800de48d

The HMAC key is the signature secret, which is unique to each webhook (Dashboard → Settings → Integrations → Webhooks). It is not your community_api-prefixed Async REST API token. Always HMAC the raw request body — re-serializing the JSON changes the bytes and breaks the signature.

const crypto = require('crypto');

function verifyCommunitySignature(rawBody, signatureHeader, secret) {
  if (!signatureHeader || !secret) return false;

  // Parse "t=...,v1=..." without assuming field order
  const fields = Object.fromEntries(
    signatureHeader.split(',').map((p) => {
      const i = p.indexOf('=');
      return i === -1 ? ['', ''] : [p.slice(0, i).trim(), p.slice(i + 1).trim()];
    })
  );
  const timestamp = fields.t;
  const signature = fields.v1; // only the v1 scheme is supported
  if (!timestamp || !signature) return false;

  // Signed content is: timestamp + "." + raw body
  const expected = crypto
    .createHmac('sha256', secret)
    .update(`${timestamp}.${rawBody}`, 'utf8')
    .digest('hex');

  try {
    return crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
  } catch {
    return false; // length mismatch
  }
}

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

There is no official Community SDK for webhook verification in any language — implement the HMAC directly, as above.

Event Types

Community documents six event types. Subscriptions are selected per webhook in the Dashboard.

Event Triggered When object
message.inbound A member sends a message to your account message
message.outbound Your account sends a message to a member (some are filtered out, including media-only messages) message
member.created A new member joins member
member.updated A member unsubscribes or changes any standard personal data collected member
member.deleted A member deletes themselves member
member.opted_out A member unsubscribes, such as by replying STOP; includes an opt_out object member

An opt-out sends both member.updated and member.opted_out for the same member.

Payload Envelope

{
  "id": "4fab65b1-c98f-466e-b52f-c170768a6d89",
  "type": "member.created",
  "object": "member",
  "created": "2025-01-05T23:59:45.643131Z",
  "api_version": "2024-02-12",
  "data": { "object": { "id": "7a3e02ec-...", "active": true } }
}

Event data lives at data.object in every documented sample payload. The prose in the same doc page says member events "include a member object in the event's data field", so handlers should read data.object first and fall back to data.member / data.message defensively.

member.deleted payloads are sparse — only id, active: false, timestamp, client_id, communication_channel, and an emptied communication_channel_id. Never assume email, given_name, geolocation, or any other personal-data field is present on a member event.

Delivery Semantics

  • At-least-once. The same event can be delivered more than once. Deduplicate on the top-level event id, which stays the same across retries. Store it for at least two hours (longer than the one-hour retry window) and record it atomically before processing. Never deduplicate on data.object.id: that is the member or message, and separate events share it (an opt-out sends member.updated and member.opted_out for the same member). For sends, record the id before acting, so a failure skips the action rather than repeating it.
  • Ordering. Retried events can arrive after newer ones. Compare the member's timestamp with the one you stored and ignore older updates.
  • Respond 2xx (200–299) within 15 seconds. The response body is ignored.
  • Retries: on a connection error, non-2
Полный SKILL.md на GitHub

Установить community-webhooks в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

examples/express/.env.exampleexamples/express/README.mdexamples/express/package.jsonexamples/express/src/index.jsexamples/fastapi/.env.exampleexamples/fastapi/README.mdexamples/fastapi/main.pyexamples/fastapi/requirements.txtexamples/fastapi/test_webhook.pyexamples/nextjs/.env.exampleexamples/nextjs/README.mdexamples/nextjs/app/webhooks/community/route.tsexamples/nextjs/package.jsonexamples/nextjs/vitest.config.tsreferences/overview.mdreferences/setup.mdreferences/verification.md

FAQ

Что делает скилл community-webhooks?

Receive and verify Community (community.com) SMS platform webhooks. Use when setting up a Community webhook handler, debugging `community-signature` HMAC-SHA256 verification, or handling message.inbound, message.outbound, member.created, member.updated, member.deleted, and member.opted_out events.

Как установить скилл community-webhooks?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл community-webhooks запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить community-webhooks с