instagram-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify Instagram (Meta) webhooks. Use when setting up Instagram webhook handlers, completing the GET hub.challenge handshake, debugging…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Instagram Webhooks
Instagram webhooks use the Meta webhook mechanism: a GET handshake when you save the
Callback URL, then POST deliveries signed with X-Hub-Signature-256. They do not follow
the Standard Webhooks spec. The body is { "object": "instagram", "entry": [...] }.
Meta has three Instagram API setups (Instagram API with Unified Login, with Instagram Login, and with Facebook Login). They differ in token, API host, permissions and some payload shapes, but the webhook handshake and signature are the same.
When to Use This Skill
- How do I receive Instagram webhooks?
- How do I verify Instagram webhook signatures with X-Hub-Signature-256?
- How do I complete the Instagram hub.challenge verification handshake?
- Why is my Instagram webhook signature verification failing?
- How do I handle Instagram
comments,mentionsormessages(DM) notifications?
Two Requests, Two Jobs
GET: handshake. Meta sendshub.mode=subscribe,hub.verify_tokenandhub.challenge. If the token matches the Verify Token you set in the App Dashboard, reply200with the rawhub.challenge.POST: event delivery. A JSON body signed withX-Hub-Signature-256.
Verification (core)
Meta sends X-Hub-Signature-256: sha256=<hex>, the HMAC-SHA256 hex digest of the raw
request body keyed with your app secret. Require the sha256= prefix, check the digest is
exactly 64 hex characters (Buffer.from(x, 'hex') silently truncates invalid hex), and
compare in constant time. Verify before parsing JSON.
Which secret? Meta's Instagram webhooks guide says to sign with "your app's App Secret" (App settings > Basic). Apps using Instagram API with Instagram Login also have a separate Instagram app secret (Instagram > API setup with Instagram login > Business login settings). The docs don't say whether Instagram Login webhooks are signed with that one. Start with the App Secret; if verification fails on an Instagram Login app, try the Instagram app secret.
Node:
const crypto = require('crypto');
function verify(rawBody, signatureHeader, appSecret) {
const match = /^sha256=([0-9a-f]{64})$/i.exec(signatureHeader || '');
if (!match || !appSecret) return false;
const received = Buffer.from(match[1], 'hex'); // safe: regex guarantees 64 hex chars
const expected = crypto.createHmac('sha256', appSecret).update(rawBody).digest();
return received.length === expected.length && crypto.timingSafeEqual(received, expected);
}
Python:
import hmac, hashlib, re
def verify(raw_body: bytes, signature_header: str, app_secret: str) -> bool:
match = re.fullmatch(r"sha256=([0-9a-fA-F]{64})", signature_header or "")
if not match or not app_secret:
return False
expected = hmac.new(app_secret.encode(), raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(match.group(1).lower().encode(), expected.encode())
In Express, read the body with express.raw({ type: '*/*' }) so every content type reaches
the verifier as unparsed bytes.
For complete handlers with the GET handshake, event dispatch, and tests, see:
Common Event Types
Each entry carries either changes[] (field changes) or messaging[] (messaging
events). For changes[] the event is changes[].field; for messaging[] the event is the
key present on the item.
| Subscribed field | Arrives in | Item shape | Triggered when |
|---|---|---|---|
comments |
changes[] |
value.id or value.comment_id, from, text, media |
A comment is made on the account's media |
live_comments |
changes[] |
same as comments |
A comment is made during a live broadcast |
mentions |
changes[] |
value.media_id, value.comment_id |
The account is @mentioned in a caption or comment (Facebook / Unified Login; Instagram Login folds mentions into comments) |
story_insights |
changes[] |
value.media_id, impressions, reach, ... |
A story expires (first 24h of metrics) |
messages |
messaging[] |
message (is_echo, is_deleted, attachments, ...) |
A DM is received, or sent by the account (echo) |
message_reactions |
messaging[] |
reaction |
A message is reacted to / unreacted |
messaging_postbacks |
messaging[] |
postback |
An Icebreaker or Generic Template button is tapped |
messaging_referral |
messaging[] |
referral |
An ig.me link with ref is opened in an existing thread |
messaging_seen |
messaging[] |
read |
A message is read |
Fields available depend on the API setup (see references/overview.md).
{
"object": "instagram",
"entry": [
{
"id": "17841405726653026",
"time": 1569262486134,
"messaging": [
{
Установить instagram-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл instagram-webhooks?
Receive and verify Instagram (Meta) webhooks. Use when setting up Instagram webhook handlers, completing the GET hub.challenge handshake, debugging X-Hub-Signature-256 signature verification, or handling Instagram comments, live_comments, mentions, story_insights, messages, message_reactions, messaging_postbacks, messaging_referral, and messaging_seen notifications.
Как установить скилл instagram-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл instagram-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