ayrshare-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify Ayrshare webhooks. Use when setting up Ayrshare social media API webhook handlers, debugging X-Authorization-Content-SHA256-V2 signature…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Ayrshare Webhooks
Ayrshare is a social media posting and management API. It POSTs JSON to a URL you register per action (scheduled posts, social account linking, messages, comments, ads, ...) on your Primary Profile or a User Profile. Deliveries are signed with HMAC-SHA256 when you set a signing secret.
Register a webhook secret with Ayrshare. Without one, deliveries are unsigned and fail verification.
When to Use This Skill
- How do I receive Ayrshare webhooks?
- How do I verify the Ayrshare
X-Authorization-Content-SHA256-V2signature? - Why does my Ayrshare webhook signature fail after rotating the secret?
- How do I handle Ayrshare
scheduled,social,messagesorcommentsactions? - How do I deduplicate Ayrshare webhook retries (
hookId)?
Verification (core)
Ayrshare sends X-Authorization-Content-SHA256-V2: v1=<hex>, the lowercase hex
HMAC-SHA256 of the raw request body keyed with your signing secret (UTF-8
bytes, used as-is). For 24 hours after a rotation the header carries two entries,
v1=<current>,v1=<previous>: accept the delivery if any v1= entry matches. The
timestamp header (X-Authorization-Timestamp) is not signed, so there is no replay
window to check.
const crypto = require('crypto');
const HEX_SHA256 = /^[0-9a-fA-F]{64}$/;
function verifyAyrshareSignature(rawBody /* Buffer */, header, secret) {
if (!header || !secret) return false;
const expected = crypto.createHmac('sha256', secret).update(rawBody).digest();
let matched = false;
for (const part of header.split(',')) {
let candidate = part.trim();
if (candidate.startsWith('v1=')) candidate = candidate.slice(3);
else if (candidate.includes('=')) continue; // other key: ignore
if (!HEX_SHA256.test(candidate)) continue; // validate before decoding
if (crypto.timingSafeEqual(Buffer.from(candidate, 'hex'), expected)) matched = true;
}
return matched;
}
Return 401 for a missing, empty, malformed or non-matching header. Parse the JSON
only after the check, and treat every field of the parsed body as untrusted
(check types before reading into nested objects).
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
Hookdeck's Ayrshare source (AYRSHARE) verifies the same signature.
Common Event Types
Dispatch on the body's top-level action. subAction refines messages,
comments, mentions and scheduled; automations and ads carry a type.
action |
Detail | Triggered when |
|---|---|---|
scheduled |
status, postIds, errors; subAction: tikTokPublished |
A scheduled post was processed (success or error); TikTok finished publishing |
social |
type: link, unlink, refresh |
A social account was linked, unlinked or needs refreshing |
messages |
subAction: messageCreated, messageEdited, messageRead, reactionCreated, reactionDeleted |
A direct message was received, edited, read or reacted to |
comments |
subAction: comment |
A comment was created on connected content |
mentions |
subAction: mention |
Your Instagram account was mentioned |
batch |
batchType, url, userCount |
A batch export of users is ready |
feed |
data |
A new RSS feed item was found |
automations |
type: automation.triggered, automation.completed |
An automation fired or finished |
ads |
type: created, campaignCreated, statusChanged, reviewChanged, spendSynced, accountConnected, accountDisconnected, accountRevoked |
An ad or ad account changed |
demo |
type: upgradeWarning, upgrade |
A Demo User Profile converts in two days, or has converted |
suspended |
type: suspend, unsuspend |
Profile suspended or reinstated |
The examples handle scheduled, social, messages, comments and ads, and
log the rest.
Delivery and Idempotency
Answer 200 within 15 seconds. 408, 425, 429, 5xx, timeouts and dropped
connections are retried (up to 9 attempts over about an hour, then roughly 5 min,
30 min, 2 h and 12 h later); other 4xx responses are final. Delivery is at least
once. hookId is the same on every retry of a delivery, but a fresh notification of
the same event arrives with a new hookId, so claim hookId and a key built from the
payload (for messages, id with subAction), and hold both for 24 hours or more. A
retry rebuilds the payload, so the bytes (and signature) can differ between attempts.
Environment Variables
AYRSHARE_WEBHOOK_SECRET=your_ayrshare_signing_secret
One secret per User Profile, shared by every action that profile registers. The
examples return 500 if it is not set.
Local Development
For local webhook testing, run the Hookdeck CLI via npx (no install required):
npx hookdeck-cli listen 3000 ayrshare --path /webhooks/ayrshare
No acc
Установить ayrshare-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл ayrshare-webhooks?
Receive and verify Ayrshare webhooks. Use when setting up Ayrshare social media API webhook handlers, debugging X-Authorization-Content-SHA256-V2 signature verification, rotating the signing secret, or handling scheduled, social, messages, comments, mentions and ads actions.
Как установить скилл ayrshare-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ayrshare-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