Overview
Why this library
Section titled “Why this library”- Zero runtime dependencies. It uses the platform
fetchandAbortController, so there is noaxiosornode-fetchin your tree. - Fully typed. Every method, option, payload and webhook event ships with
.d.tsdeclarations, for both ESM and CommonJS. - Fail-fast validation. Documented API limits (body and footer lengths, button counts, list rows, reaction emoji and more) are checked before the request is sent. Nothing is silently truncated.
- Typed errors. Rate limits, re-engagement, authentication, validation and webhook failures are distinct classes. Requests retry with backoff. Message sends retry on
429only, so a retry cannot deliver a message twice. - Business-scoped user IDs. Webhook types expose BSUID and username fields, and senders accept a
{ bsuid }recipient. See Usernames and BSUIDs. - Released from CI with npm provenance through OIDC trusted publishing.
| Capability | API |
|---|---|
| Send text & media | client.messages.sendText, sendImage, sendVideo, sendAudio, sendDocument, sendSticker |
| Send templates | client.messages.sendTemplate |
| Interactive messages | sendInteractiveButtons, sendInteractiveList, sendInteractiveCtaUrl, sendInteractiveFlow |
| Location, contacts, more | sendLocation, sendContacts, sendLocationRequest, sendProduct, sendProductList, sendAddressMessage |
| Reactions & typing | sendReaction, markAsRead, sendTypingIndicator |
| Any other message body | client.messages.sendRaw |
| Upload & download media | client.media.upload, getUrl, download, delete |
| Receive & verify webhooks | verifyWebhook, verifySignature, parseWebhook, extractMessages, WebhookHandler |
| Manage phone numbers | client.phoneNumbers (register, verify, business profile, two-step PIN) |
| Manage WABAs | client.waba (list numbers, subscribe webhooks) |
| Manage templates | client.templates (list, get, create, edit, delete) |
| Manage flows | client.flows (create, publish, update JSON, list, get, deprecate, delete, assets, preview) |
| Block & unblock users | client.blocks (block, unblock, list) |
| Calling settings & calls | client.calls (getSettings, updateSettings, initiate, preAccept, accept, reject, terminate) |
How it compares
Section titled “How it compares”Facts below were checked against the npm registry and GitHub on 2026-11-21. Check each project yourself before choosing; they change.
| Option | What it is | Status when checked | Runtime dependencies |
|---|---|---|---|
| This package | Cloud API SDK for TypeScript | Actively released | None |
whatsapp (Meta’s Node.js SDK) |
Cloud API SDK | GitHub repository archived; last npm release 0.0.5-Alpha, 2023-04-11 |
@types/node |
whatsapp-cloud-api |
Cloud API wrapper | GitHub repository archived; last npm release 0.3.1, 2023-04-11 |
axios, express, dotenv and others |
whatsapp-api-js |
Cloud API library | Last npm release 6.3.0, 2026-09-21 |
None |
@great-detail/whatsapp |
Cloud API SDK | Last npm release 9.2.0, 2026-09-22 |
ky, openapi-fetch |
@kapso/whatsapp-cloud-api |
Cloud API SDK | Last npm release 0.4.0, 2026-10-23 |
zod |
| Baileys, whatsapp-web.js | Unofficial clients that emulate WhatsApp Web | Not the Cloud API | See each project |
Baileys and whatsapp-web.js drive a regular WhatsApp account through the WhatsApp Web protocol or browser automation, not through Meta’s business API. WhatsApp’s terms of service restrict automated or unauthorized access to its services, so check them before using these projects for a business integration. The Cloud API, through this package or one of the other SDKs above, is the supported route for business messaging.
Pick this package when you want no runtime dependencies, strict TypeScript types and a small, testable surface. Pick another if it covers something you need that this one does not, for example a hosted platform or generated OpenAPI clients.
For a longer comparison with dates, see Choosing a WhatsApp Cloud API library for Node.js.
When to use this package
Section titled “When to use this package”Use it when:
- You call the WhatsApp Cloud API from Node.js 20+, Bun, Deno or Cloudflare Workers and want typed requests and responses.
- You want no runtime dependencies and a webhook handler that verifies
X-Hub-Signature-256against the raw body. - You are replacing the archived
whatsapp-cloud-apior Metawhatsapppackage.
Do not use it when:
- You need a hosted inbox, a no-code builder or a managed platform. This is a client library only.
- You want built-in Express, Next.js, Hono or Fastify webhook adapters. Here you pass the raw body (or a
Request) yourself; see the examples. - You need to drive a regular WhatsApp account rather than the business API.
- You need Node.js 18 or older.
Independent open-source project. Not affiliated with, endorsed by or sponsored by Meta or WhatsApp. Released under the MIT licence. Source on GitHub.