Install and verify
View @qentrah/whatsapp on npm ↗
Before you start
node:>=20.
Use a project with a package.json. Check the runtime and package manager:
node --version
npm --versionInstall the documented version
npm install @qentrah/whatsapp@0.1.3Confirm the installation
npm ls @qentrah/whatsappThe output should show @qentrah/whatsapp@0.1.3. Commit the lockfile so another developer installs the same dependency tree.
Quickstart
import { WhatsAppClient } from "@qentrah/whatsapp";
const whatsapp = new WhatsAppClient({
accessToken: process.env.WHATSAPP_ACCESS_TOKEN!,
phoneNumberId: process.env.WHATSAPP_PHONE_NUMBER_ID!,
wabaId: process.env.WHATSAPP_WABA_ID,
appId: process.env.META_APP_ID,
appSecret: process.env.META_APP_SECRET,
verifyToken: process.env.WHATSAPP_VERIFY_TOKEN,
});
await whatsapp.messages.sendText("201234567890", "Hello from WhatsApp Cloud API");Expected result
The send promise returns Meta’s accepted message response. Delivery is a separate event reported through webhooks. Replace the example recipient with a permitted test recipient in your Meta setup.
Source captured: 2026-10-11