Quick Start
Build and run your first WhatsApp bot in under 5 minutes.
Installation
Add Baileys to your project and check compatibility requirements.
Authentication
Connect your WhatsApp account using QR code or pairing code.
Sending Messages
Send text, media, polls, reactions, and more.
Why Baileys?
Baileys communicates with WhatsApp using the same binary WebSocket protocol as WhatsApp Web — without any browser overhead. This means your bots and integrations use a fraction of the memory of Selenium-based approaches.Events
Listen for messages, connection changes, and group updates in real time.
Groups
Create groups, manage participants, and configure group settings.
Privacy & Presence
Control privacy settings and subscribe to presence updates.
Advanced Usage
Register custom WebSocket callbacks and extend Baileys functionality.
Get started in 3 steps
1
Install the library
Add Baileys to your Node.js project using your package manager of choice. Install
qrcode-terminal too if you want to render the pairing QR in your terminal.2
Authenticate
Create a socket and scan the QR code with your WhatsApp app to link your account.
3
Send your first message
Once connected, send a message to any WhatsApp number.
Baileys is an unofficial library and is not affiliated with WhatsApp. Use it responsibly and in accordance with WhatsApp’s Terms of Service. The maintainers do not condone bulk messaging, spam, or stalkerware use cases.