Welcome to Baileys
Baileys is a lightweight, efficient TypeScript library that lets you interact with WhatsApp Web through WebSockets - no Selenium, no Chromium, and no heavy browser automation.Why choose Baileys?
Baileys directly interfaces with WhatsApp Web using WebSockets, making it significantly more efficient than browser-based automation tools.Memory efficient
No Selenium or Chromium means you save approximately 500MB of RAM per instance
Multi-device support
Works seamlessly with WhatsApp’s multi-device architecture
TypeScript first
Fully typed API with excellent IntelliSense support for better developer experience
Production ready
Battle-tested library used by developers worldwide with active community support
Key features
Authentication methods
Connect to WhatsApp using either QR code scanning or pairing codes - both methods support WhatsApp’s multi-device functionality.Comprehensive messaging
Send and receive all message types including text, media (images, videos, audio), documents, locations, contacts, polls, reactions, and more.Full API coverage
Manage groups, handle privacy settings, work with broadcast lists, modify chats, query user information, and access nearly every feature available in WhatsApp Web.Event-driven architecture
Use EventEmitter patterns to handle messages, connection updates, presence changes, and all WhatsApp events with strongly-typed event handlers.Quick example
Here’s what it takes to connect and send a message:Get started
Installation
Install Baileys using npm, yarn, or pnpm
Quick start
Get your first WhatsApp bot running in minutes
Migration guide
Upgrading from an older version? Check the migration guide
API reference
Explore the complete API documentation
Community and support
Join the Discord community at discord.gg/WeJM5FP9GG for help, discussions, and updates.
Credits
Baileys builds upon the work of several researchers and developers:- @pokearaujo for documenting WhatsApp Multi-Device
- @Sigalor for WhatsApp Web reverse engineering
- @Rhymen for the Go implementation