Skip to content
TypeScript SDK for WhatsApp Cloud API

meta-cloud-api

Build type-safe WhatsApp integrations with a comprehensive, modular SDK — 17 API modules, webhook adapters, and full TypeScript support.
$ pnpm add meta-cloud-api
app.ts
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),{"
"}{"}"});

await client.messages.text({
  to: '15551234567',{"
"}  body: 'Hello from meta-cloud-api!',{"
"}{"}"});
// ✓ Message sent successfully

Why meta-cloud-api?

Type-Safe

Full TypeScript strict mode with comprehensive type definitions. Catch errors at compile time, not in production.

17 API Modules

Messages, media, templates, flows, groups, calling, payments, and more — every WhatsApp Cloud API endpoint covered.

Framework Adapters

Built-in webhook handlers for Express.js and Next.js. App Router and Pages Router both supported out of the box.

Production Ready

Battle-tested error handling, retry logic, and utilities. Tree-shakeable imports keep your bundle lean.

What’s Included

  • Messages API — Text, image, video, document, audio, location, contacts, interactive messages, reactions, and templates
  • Webhook System — Framework-agnostic processor with Express.js and Next.js adapters
  • Media Management — Upload, download, and manage media files
  • Business Tools — Flows, QR codes, commerce settings, marketing messages, and payments
  • Account Management — Phone numbers, registration, two-step verification, WABA, and encryption
  • Group Features — Create and manage group conversations
  • Calling API — Voice and video calling integration