@chat-adapter/whatsapp weekly downloads statistics
By chat-adapter (14 listings) · npm · AI SDKs
WhatsApp adapter for Chat SDK — Business Cloud API webhooks, interactive messages, and templates
@chat-adapter/whatsapp has 140,960 recorded weekly downloads on npm, an increase of 3.3% over the past 30 days, ranking #430 of 2,322 tracked listings.
About @chat-adapter/whatsapp
@chat-adapter/whatsapp
npm package:
@chat-adapter/whatsapp
WhatsApp Business Cloud adapter for Chat SDK, using the WhatsApp Business Cloud API.
Documentation: chat-sdk.dev/adapters/official/whatsapp · Guides: vercel.com/kb/chat-sdk
Installation
pnpm add @chat-adapter/whatsapp
Scaffold with the CLI
To scaffold a new WhatsApp bot with this adapter preselected:
npx create-chat-sdk@latest my-bot --adapter whatsapp memory
Visit the adapters directory to see other available official and vendor-official adapters.
Usage
import { Chat } from "chat";
import { createWhatsAppAdapter } from "@chat-adapter/whatsapp";
const bot = new Chat({
userName: "mybot",
adapters: {
whatsapp: createWhatsAppAdapter(),
},
});
bot.onNewMention(async (thread, message) => {
await thread.post("Hello from WhatsApp!");
});
When using createWhatsAppAdapter() without arguments, credentials are auto-detected from environment variables.
WhatsApp Business setup
1. Create a Meta app
- Go to developers.facebook.com/apps
- Click Create App, select Business type
- Add the WhatsApp product to your app
- Go to WhatsApp > API Setup and note your Phone Number ID and Access Token
2. Configure webhooks
- Go to WhatsApp > Configuration in your Meta app
- Set Callback URL to
https://your-domain.com/api/webhooks/whatsapp - Set Verify Token to a secret string of your choice (this becomes
WHATSAPP_VERIFY_TOKEN) - Subscribe to the
messageswebhook field
3. Get credentials
From your Meta app dashboard, copy:
- App Secret (under App Settings > Basic) as
WHATSAPP_APP_SECRET - Access Token (under WhatsApp > API Setup) as
WHATSAPP_ACCESS_TOKEN - Phone Number ID (under WhatsApp > API Setup) as
WHATSAPP_PHONE_NUMBER_ID
For production, generate a permanent System User Token instead of the temporary access token.
Inbound attachments
Incoming media attachments expose a lazy fetchData(). Media is downloaded only from Meta's fbcdn.net and fbsbx.com hosts or the configured Graph origin. Downloads refuse private and internal addresses, are limited to 25 MB, and time out after 30 seconds, and the access token never follows a redirect off those hosts. Pass a custom transport to downloadMedia() to route downloads through a proxy.
Configuration
All options are auto-detected from environment variables when not provided. You can call createWhatsAppAdapter() with no arguments if the env vars are set.
| Option | Required | Description |
|---|---|---|
accessToken | No* | Meta access token. Auto-detected from WHATSAPP_ACCESS_TOKEN |
appSecret | No* | App secret for webhook verification. Auto-detected from WHATSAPP_APP_SECRET |
phoneNumberId | No* | Bot's phone number ID. Auto-detected from WHATSAPP_PHONE_NUMBER_ID |
verifyToken | No* | Webhook verification secret. Auto-detected from WHATSAPP_VERIFY_TOKEN |
apiVersion | No | Graph API version (defaults to v25.0) |
userName | No | Bot username for self-message detection. Auto-detected from WHATSAPP_BOT_USERNAME (defaults to whatsapp-bot) |
apiUrl | No | Override the Meta Graph API base URL. Auto-detected from WHATSAPP_API_URL |
logger | No | Logger instance (defaults to ConsoleLogger("info")) |
*Required at runtime — either via config or environment variable.
Environment variables
WHATSAPP_ACCESS_TOKEN=... # Meta access token (permanent or system user token)
WHATSAPP_APP_SECRET=... # App secret for X-Hub-Signature-256 verification
WHATSAPP_PHONE_NUMBER_ID=... # Bot's phone number ID from Meta dashboard
WHATSAPP_VERIFY_TOKEN=... # User-defined secret for webhook verification
WHATSAPP_BOT_USERNAME=... # Optional, defaults to "whatsapp-bot"
WHATSAPP_API_URL=... # Optional, override the Meta Graph API base URL
Webhook setup
WhatsApp uses two webhook mechanisms:
- Verification handshake (GET) — Meta sends a
hub.verify_tokenchallenge that must match yourWHATSAPP_VERIFY_TOKEN. - Event delivery (POST) — incoming messages, reactions, and interactive responses, verified via
X-Hub-Signature-256.
// Next.js App Router example
import { bot } from "@/lib/bot";
export async function GET(request: Request) {
return bot.webhooks.whatsapp(request);
}
export async function POST(request: Request) {
return bot.webhooks.whatsapp(request);
}
Features
Messaging
| Feature | Supported |
|---|---|
| Post message | Yes |
| Edit message | No (WhatsApp limitation) |
| Delete message | No (WhatsApp limitation) |
| Streaming | Buffered (accumulates then sends) |
| Mark as read | Yes |
| Auto-chunking | Yes (splits at 4096 chars) |
| Template messages | Yes (via sendTemplate) |
Rich content…
Description from the npm listing.
- chat
- chat-sdk
- chatbot
- whatsapp-business
- bot
- adapter
- messaging
- meta
- cloud-api
- ai-agent
- ai-sdk
- vercel
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (544)Similar npm AI SDKs plugins
All 20 @chat-adapter/whatsapp alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@chat-adapter/whatsapp. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.