A client-side JavaScript library that automates WhatsApp Web for building normal and agentic bots. No WhatsApp Business API required.
Controls WhatsApp Web via Playwright browser automation. No API credentials needed. The bot interacts with the UI exactly as a human user would.
Supports both QR code scanning and phone pairing code. Use either independently. Session persistence for reconnection without re-auth.
Send text, media, location, contacts, buttons, lists, polls. Manage chats, groups, contacts, profile. Download media. Search messages.
Event-driven architecture with typed events. Build autonomous bots that react to messages, acks, reactions, presence changes, and calls.
AES-256-GCM session encryption, input validation on every API surface, token bucket rate limiting, circuit breaker, anti-detection measures.
REST API gateway hosted on Cloudflare Pages. No Workers needed. Free plan compatible. Stateless proxy to your bot host.
// Install npm install wabot // Use in your project import { Wabot } from 'wabot'; const bot = await Wabot.create({ session: 'my-bot', connectionMode: 'qr', onReady: () => console.log('Ready!'), onMessage: (msg) => console.log(msg.body), }); await bot.sendText('2348012345678@c.us', 'Hello from Wabot!');
The Wabot API gateway is hosted on Cloudflare Pages. It proxies requests to your Wabot host instance.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/session/start | Start a new bot session |
| GET | /api/v1/session/status | Get session status |
| POST | /api/v1/session/qr | Get QR code |
| POST | /api/v1/session/pairing-code | Get pairing code |
| POST | /api/v1/send/text | Send text message |
| POST | /api/v1/send/media | Send media message |
| POST | /api/v1/send/broadcast | Send broadcast (5/batch) |
| GET | /api/v1/chats | List all chats |
| GET | /api/v1/contacts | List all contacts |
| GET | /api/v1/groups | List all groups |
| GET | /api/v1/health | Health check |