Type-Safe
Full TypeScript support with strict mode and comprehensive type definitions for all API endpoints.
Type-Safe
Full TypeScript support with strict mode and comprehensive type definitions for all API endpoints.
Modular Architecture
17 API modules including messages, media, templates, flows, webhooks, and more.
Framework Support
Built-in webhook adapters for Express.js and Next.js (App Router & Pages Router).
Production Ready
Battle-tested with comprehensive error handling, retry logic, and logging utilities.
Install the package via npm, yarn, or pnpm:
pnpm add meta-cloud-apiInitialize the SDK:
import WhatsApp from 'meta-cloud-api';
const client = new WhatsApp({ accessToken: process.env.CLOUD_API_ACCESS_TOKEN, phoneNumberId: Number(process.env.WA_PHONE_NUMBER_ID), businessAcctId: process.env.WA_BUSINESS_ACCOUNT_ID,});Send your first message:
await client.messages.text({ to: '15551234567', body: 'Hello from meta-cloud-api!',});