npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@chat-adapter/instagram

v4.38.1

Published

Instagram Direct Messages adapter for Chat SDK — native Meta Messaging API webhooks, media, and quick replies

Readme

Instagram Direct Messages adapter for Chat SDK

@chat-adapter/instagram

npm package: @chat-adapter/instagram

Agent Stack MIT License

Native Instagram Direct Messages adapter for Chat SDK. It uses Meta's Instagram API with Instagram Login and does not require an aggregator.

Documentation: chat-sdk.dev/adapters/official/instagram · Guides: vercel.com/kb/chat-sdk

Building for Facebook Messenger? Use @chat-adapter/messenger instead. It connects through the Messenger Platform API and uses a Facebook Page access token.

Installation

pnpm add @chat-adapter/instagram

Scaffold with the CLI

npx create-chat-sdk@latest my-bot --adapter instagram memory

Visit the adapters directory to see other available official and vendor-official adapters.

Configure

INSTAGRAM_ACCESS_TOKEN=
INSTAGRAM_APP_SECRET=
INSTAGRAM_VERIFY_TOKEN=
INSTAGRAM_ACCOUNT_ID=
# Optional; defaults to v26.0
INSTAGRAM_API_VERSION=

The Instagram account must be a professional Business or Creator account. The Meta app needs instagram_business_basic and instagram_business_manage_messages; production apps serving accounts they do not own require Advanced Access.

Subscribe the Instagram webhook object to messages, messaging_postbacks, messaging_reactions, messaging_seen, messaging_referrals, and messaging_optins.

Use

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

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

bot.onDirectMessage(async (thread, message) => {
  await thread.post(`Thanks for reaching out! You said: ${message.text}`);
});

export const POST = bot.webhooks.instagram;
export const GET = bot.webhooks.instagram;

Thread IDs use instagram:{accountId}:{igsid} so conversations stay scoped to the professional account that received them.

Features

  • Receive and send text DMs
  • Receive story replies, story mentions, shares, media, and reactions
  • Send image, video, audio, and PDF attachments by public HTTPS URL or upload
  • Cards using Instagram templates or quick replies
  • Typing indicators
  • Buffered streaming
  • Signed webhooks and subscription verification

Instagram does not support message editing, message deletion, group chats, or modals through this API.

Messaging window

Free-form replies must be sent within 24 hours of the customer's latest message. Window failures are surfaced as a typed ValidationError.

For a real human support agent with the required Meta permission, the adapter exposes:

await instagram.sendHumanAgentMessage(threadId, "A human follow-up");

HUMAN_AGENT extends the window to seven days and is audited by Meta. It must not be used for automated messages.

AI Coding Agents

If you use an AI coding agent such as OpenAI Codex, Claude Code, or Cursor, install the Chat SDK skill before writing code:

npx skills add vercel/chat

The skill references the bundled documentation in node_modules/chat/docs. You can also install the optional Vercel Plugin:

npx plugins add vercel/vercel-plugin

For agent-readable documentation, see chat-sdk.dev/llms.txt or chat-sdk.dev/llms-full.txt.

License

MIT