Skip to content

FAQ

How do I send a WhatsApp template message?

Section titled “How do I send a WhatsApp template message?”

Use client.messages.sendTemplate with the approved template name and language. Template messages are the only messages you can send outside the 24-hour customer service window.

await client.messages.sendTemplate('15551234567', {
name: 'hello_world',
language: { code: 'en_US' },
});

To create, list, edit, or delete templates, see Template management.

No runtime dependencies. It uses the fetch and AbortController built into Node.js 20+.

Node.js 20 or newer, as engines.node states. CI imports the built ESM and CommonJS entry points on Node 20 and runs the full checks on Node 22 and 24. See Runtime support.

Do I need a Meta WhatsApp Business account?

Section titled “Do I need a Meta WhatsApp Business account?”

Yes. You need a WhatsApp Business Account (WABA), a business phone number ID and an access token. The SDK calls Meta’s Graph API on your behalf.

Every API failure is a typed subclass of WhatsAppApiError, for example WhatsAppRateLimitError (with retryAfterMs) and WhatsAppReEngagementError. See Error handling.

Independent open-source project. Not affiliated with, endorsed by or sponsored by Meta or WhatsApp. Released under the MIT licence. Source on GitHub.