configcat-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify ConfigCat webhooks. Use when setting up ConfigCat webhook handlers, debugging X-ConfigCat-Webhook-Signature-V1 verification, or reacting to…
от hookdeck★ 104 звезды на GitHubОб этом скилле
ConfigCat Webhooks
When to Use This Skill
- How do I receive ConfigCat webhooks?
- How do I verify the ConfigCat
X-ConfigCat-Webhook-Signature-V1header? - Why is my ConfigCat webhook signature verification failing?
- How do I react when a feature flag or setting changes in ConfigCat?
- How do I handle two signatures during a ConfigCat signing key rotation?
Verification (core)
ConfigCat sends X-ConfigCat-Webhook-ID, X-ConfigCat-Webhook-Timestamp (Unix seconds) and X-ConfigCat-Webhook-Signature-V1. The signature is the standard base64 (padded) HMAC-SHA256 of the webhook ID, the timestamp and the raw body, concatenated with no separators. The key is the whole signing key (configcat_whsk_...) as UTF-8 bytes, not decoded. The body may be empty, and then only ID + timestamp are signed. The header is a comma-separated list with one signature per signing key (two during a rotation): accept a match on any entry.
const crypto = require('crypto');
function verify(rawBody, id, timestamp, signature, secret) {
if (!id || !timestamp || !signature) return false;
const message = Buffer.concat([Buffer.from(id, 'latin1'), Buffer.from(timestamp, 'latin1'), rawBody]);
const expected = Buffer.from(crypto.createHmac('sha256', Buffer.from(secret, 'utf8')).update(message).digest('base64'));
// One signature per signing key, comma-separated: accept any match
return signature.split(',').map((s) => s.trim()).filter((s) => /^[A-Za-z0-9+\/]{43}=$/.test(s)).some((s) => {
const received = Buffer.from(s);
return expected.length === received.length && crypto.timingSafeEqual(expected, received);
});
}
import base64, hashlib, hmac, re
def verify(raw_body: bytes, wid: str, ts: str, signature: str, secret: str) -> bool:
if not wid or not ts or not signature:
return False
message = wid.encode("latin-1") + ts.encode("latin-1") + raw_body
expected = base64.b64encode(hmac.new(secret.encode("utf-8"), message, hashlib.sha256).digest())
# One signature per signing key, comma-separated: accept any match (compare the base64 text)
entries = [s.strip() for s in signature.split(",")]
return any(
re.fullmatch(r"[A-Za-z0-9+/]{43}=", s) and hmac.compare_digest(expected, s.encode("ascii"))
for s in entries
)
Verify the raw bytes before parsing (never JSON.parse then re-serialise). Missing headers, a malformed value or a mismatch is a 401. The documented vector (secret configcat_whsk_VN3juirnVh5pNvCKd81RYRYchxUX4j3NykbZG2fAy88=, body examplebody, ID b616ca659d154a5fb907dd8475792eeb, timestamp 1669629035) must produce Ks3cYsu9Lslfo+hVxNC3oQWnsF9e5d73TI5t94D9DRA=.
Timestamp window: old timestamps are not rejected by default, because ConfigCat recommends a check but sets no window. The examples offer an opt-in CONFIGCAT_WEBHOOK_TOLERANCE_SECONDS (unset or 0 = off).
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
Hookdeck Setup Note
Paste the signing key whole, including the configcat_whsk_ prefix, and update the source's secret as soon as you rotate the key.
Hookdeck's source type is CONFIGCAT ("ConfigCat"). It accepts only the methods you allow (custom methods), so any other method the sender uses (ConfigCat allows GET or POST) must also be allowed on the source.
Event Types
ConfigCat has no event types. A call means "settings changed" in the Config and Environment the webhook is attached to. The webhook author writes the (optional) body, using ##Variable## placeholders:
| Placeholder | Replaced with |
|---|---|
##ConfigName## / ##ConfigId## |
The Config where the change happened |
##EnvironmentName## / ##EnvironmentId## |
The Environment where the change happened |
##ChangeNotes## |
The mandatory notes on the changeset |
##ChangedBy## |
Name and email of the user who made the change |
##ChangeDetails## |
JSON array of settingKey, event, details |
##URL## |
Link to the Config in the dashboard |
The examples accept any body (JSON if it parses, else text, or empty) and treat each call as a config-changed notification.
For full details, see ConfigCat webhooks.
Important Headers
| Header | Description |
|---|---|
X-ConfigCat-Webhook-ID |
Unique ID per request; ConfigCat says it "is different for every request", so it can't dedupe ConfigCat's retries |
X-ConfigCat-Webhook-Timestamp |
Send time, Unix seconds |
X-ConfigCat-Webhook-Signature-V1 |
Base64 HMAC-SHA256, one per signing key, comma-separated |
Environment Variables
CONFIGCAT_WEBHOOK_SECRET=configcat_whsk_your_signing_key # Whole key, including the prefix
CONFIGCAT_WEBHOOK_TOLERANCE_SECOND
Установить configcat-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл configcat-webhooks?
Receive and verify ConfigCat webhooks. Use when setting up ConfigCat webhook handlers, debugging X-ConfigCat-Webhook-Signature-V1 verification, or reacting to feature flag and setting changes in a Config and Environment.
Как установить скилл configcat-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл configcat-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic