bigmailer-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify BigMailer webhooks. Use when setting up BigMailer webhook handlers, debugging X-BigMailer-Signature verification, or handling email…
от hookdeck★ 104 звезды на GitHubОб этом скилле
BigMailer Webhooks
When to Use This Skill
- How do I receive BigMailer webhooks?
- How do I verify the
X-BigMailer-Signatureheader (t=...,v1=...)? - How do I handle BigMailer
bounce,click,complaint,open, orunsubscribeevents? - Why is my BigMailer webhook signature verification failing?
Essential Code (USE THIS)
BigMailer signs every event with X-BigMailer-Signature:
X-BigMailer-Signature: t=1492774578,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8be
tis the Unix timestamp (seconds). Use it as the exact string from the header.v1is HMAC-SHA256 of"<t>.<raw body>", keyed with the endpoint's signing secret (UTF-8 bytes, used as-is).v1is the only valid scheme; ignore other keys. The docs never name the digest encoding, but BigMailer's PHP example compares againsthash_hmacoutput, which is lowercase hex, so compare as hex (case-insensitively).- BigMailer's docs say the header carries a timestamp and one or more signatures. Accept the event if any
v1=entry matches. - A header with no
t=value fails. Missing, empty, malformed, or mismatched signature: respond401. - The event type is the top-level
typefield of the body. The data sits under a key named after the type (bounce,click, ...).bounce.type(hard/soft) is the bounce kind, not the event.
Verification (Node.js)
const crypto = require('crypto');
// rawBody: Buffer of the exact request bytes (express.raw({ type: '*/*' }), not express.json)
function verifyBigMailer(rawBody, signatureHeader, secret) {
if (!secret || !signatureHeader) return false;
let timestamp;
const signatures = [];
for (const item of signatureHeader.split(',')) {
const i = item.indexOf('=');
if (i <= 0) continue;
const key = item.slice(0, i).trim(), value = item.slice(i + 1).trim();
if (key === 't') timestamp = value;
else if (key === 'v1') signatures.push(value);
}
if (!timestamp || signatures.length === 0) return false;
// Optional replay window, off by default: retries and replays keep the original timestamp
const expected = Buffer.from(
crypto.createHmac('sha256', secret).update(`${timestamp}.`).update(rawBody).digest('hex')
);
return signatures.some((sig) =>
/^[0-9a-fA-F]{64}$/.test(sig) && crypto.timingSafeEqual(Buffer.from(sig.toLowerCase()), expected));
}
Verification (Python)
import hashlib, hmac, re
def verify_bigmailer(raw_body: bytes, signature_header, secret: str) -> bool:
if not secret or not signature_header:
return False
timestamp, signatures = None, []
for item in signature_header.split(","):
key, _, value = item.strip().partition("=")
if key == "t":
timestamp = value.strip()
elif key == "v1":
signatures.append(value.strip())
if not timestamp or not signatures:
return False
signed = timestamp.encode() + b"." + raw_body
expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest().encode()
return any(re.fullmatch(r"[0-9a-fA-F]{64}", s) and hmac.compare_digest(s.lower().encode(), expected)
for s in signatures)
Validate the signature's format (exactly 64 hex characters) before comparing, then compare in constant time. Never call Buffer.from(sig, 'hex') on an unvalidated value; it silently drops bad characters.
Timestamp window: the examples do not reject old timestamps by default. Hookdeck retries and replays resend the original headers and timestamp, so a fixed window would reject legitimate retries. To opt in, set BIGMAILER_WEBHOOK_TOLERANCE_SECONDS to a positive number of seconds (unset or 0 = off); t is Unix seconds.
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
Common Event Types
| Event | Description |
|---|---|
bounce |
A message bounced; bounce.type is hard or soft |
click |
A recipient clicked a link (click.url, click.link_id) |
complaint |
A recipient reported the message as spam |
open |
A recipient opened a message |
unsubscribe |
A recipient unsubscribed (unsubscribe_all, unsubscribe_ids) |
These are the five documented event types. Each payload also carries brand_id, and the nested object has date, campaign_id, contact_id, and email. See references/overview.md.
For the full event reference, see BigMailer's webhook documentation.
Important Headers
| Header | Description |
|---|---|
X-BigMailer-Signature |
t=<unix seconds>,v1=<hex>[,v1=<hex>] |
Environment Variables
BIGMAILER_WEBHOOK_SECRET=your_endpoint_signing_secret # "show" in the Webhooks settings
BI
Установить bigmailer-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл bigmailer-webhooks?
Receive and verify BigMailer webhooks. Use when setting up BigMailer webhook handlers, debugging X-BigMailer-Signature verification, or handling email engagement events like bounce, click, complaint, open, and unsubscribe.
Как установить скилл bigmailer-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bigmailer-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic