npm / @chat-adapter/whatsapp
@chat-adapter/whatsapp
What changed in @chat-adapter/whatsapp 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
2 breaking1 security8 new APIs and options5 behavior and defaults4 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@chat-adapter/whatsapp 420 changes
Breaking changes 2
Transport failures and unparseable response bodies now throw NetworkError instead of leaking raw fetch errors.
Updates the default API version to v25.0.
Security 1
WhatsApp attachment downloads use guarded downloading: private and internal addresses are refused, responses are capped at 25 MB, and downloads time out after 30 seconds. The access token is kept on Meta media hosts and the configured Graph origin.
New APIs and options 8
Exported for non-2xx Graph API responses, with Meta error details, HTTP status, the raw envelope, and a code mapped to the shared AdapterError taxonomy.
Adds native message replies with WhatsApp contextual reply support.
Adds a shared thread API for marking messages as read across WhatsApp, Messenger, and XChat.
Supports typed Attachment payloads for outbound sends, including binary or HTTPS link passthrough, multi-file sequencing, MIME mapping, caption fallbacks, and card-plus-file sequencing.
Adds sending of pre-approved template messages, enabling business-initiated conversations outside the 24-hour customer service window.
Adds typing indicator support by sending Meta's read-plus-typing payload when a recent inbound message is available.
The config argument is now optional, and every WhatsAppAdapterConfig field is optional; the factory still falls back to WHATSAPP_* environment variables.
Adds a WhatsApp adapter using Meta's WhatsApp Business Cloud API.
Behavior and default changes 5
Inbound and outbound WhatsApp messages now support business-scoped user IDs.
A card with only one eligible LinkButton is now sent as a native cta_url interactive message instead of formatted text.
The context type now makes all fields optional and includes forwarded-message and product-inquiry variants, so consumers must guard optional fields such as
fromandid.Supports binary FileUpload uploads for outbound files and attachments.
The adapter now depends on chat as a full dependency rather than an optional dependency, so installing the adapter also installs chat.
Fixes and other changes 4
Empty
fromandwa_idvalues are treated as absent, allowing messages from username users who hide their phone number to reach handlers.Incoming WhatsApp messages preserve the first line of code blocks in message text and formatted content, and bold/strikethrough rewriting no longer corrupts fenced code.
Link button URLs are now included in interactive button message bodies and media captions, rather than being dropped.
Prevents card titles and body content from appearing twice when sending cards with files on WhatsApp, and avoids adding full card fallback text as an image caption when an interactive message follows.