Skip to content

feat(instagram): add native DM adapter - #770

Open
bensabic wants to merge 7 commits into
mainfrom
feat/instagram-adapter
Open

feat(instagram): add native DM adapter#770
bensabic wants to merge 7 commits into
mainfrom
feat/instagram-adapter

Conversation

@bensabic

@bensabic bensabic commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Adds a first-party Instagram Direct Messages adapter backed by Meta's Instagram API with Instagram Login.

  • Verifies webhook challenges and HMAC signatures, then normalizes DMs, story replies, media, quick replies, postbacks, and reactions.
  • Sends plain text, cards, quick replies, typing indicators, URL attachments, and uploaded media through graph.instagram.com.
  • Maps authentication, rate-limit, and 24-hour messaging-window failures to typed adapter errors.
  • Registers Instagram in the adapter catalog, CLI scaffold, official docs, replay suite, and Next.js example.

Usage

import { createInstagramAdapter } from "@chat-adapter/instagram";
import { Chat } from "chat";

const bot = new Chat({
  userName: "mystore",
  adapters: { instagram: createInstagramAdapter() },
});

Webhook

export async function POST(request: Request) {
  return bot.webhooks.instagram(request);
}

Verification

  • pnpm --filter @chat-adapter/instagram test
  • pnpm --filter @chat-adapter/instagram typecheck
  • pnpm --filter example-nextjs-chat typecheck
  • pnpm --filter example-nextjs-chat build
  • pnpm check
  • pnpm konsistent

Live Testing

1000000502 1000000503

Closes #729 / Co-Authored by @ivandujaut

@bensabic
bensabic requested a review from a team as a code owner August 2, 2026 05:41
@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat Ready Ready Preview, v0 Aug 2, 2026 9:56am
chat-sdk-nextjs-chat Ready Ready Preview Aug 2, 2026 9:56am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adapter request: Instagram Direct Messages (@chat-adapter/instagram)

1 participant