Welcome to Baileys
Bailey is a WebSockets-based TypeScript library for interacting with the WhatsApp Web API. Unlike other solutions, Baileys doesn’t require Selenium or any browser automation - it communicates directly with WhatsApp Web using WebSockets, saving you significant resources and complexity.Baileys supports both the multi-device and web versions of WhatsApp, allowing your application to act as a secondary WhatsApp client.
Why Baileys?
Lightweight
No Selenium or Chromium required - saves approximately half a gigabyte of RAM compared to browser-based solutions.
TypeScript-first
Fully typed with IntelliSense support, making development faster and safer with comprehensive type definitions.
Multi-device support
Works with WhatsApp’s multi-device API, allowing authentication via QR code or pairing code.
Feature-rich
Send messages, media, polls, reactions, manage groups, handle events, and much more with a single unified API.
Key features
Baileys provides comprehensive WhatsApp functionality:- Direct WebSocket connection - No browser automation overhead
- Multiple authentication methods - QR code scanning or pairing code
- Rich messaging - Text, media (images, videos, audio), locations, contacts, polls, reactions, and more
- Group management - Create groups, manage participants, update settings, and handle invites
- Event handling - Real-time events for messages, presence, calls, and connection updates
- Privacy controls - Manage blocking, online status, read receipts, and disappearing messages
- Session persistence - Save and restore authentication state across restarts
Getting started
Installation
Install Baileys using your preferred package manager
Quickstart
Get up and running with a working example in minutes
API Reference
Explore the complete API documentation
Discord Community
Join the community for support and discussions
Important disclaimer
The official WhatsApp website can be found at whatsapp.com. “WhatsApp” and related trademarks are registered trademarks of their respective owners.Requirements
Baileys requires Node.js version 20.0.0 or higher to run properly.Community and support
- Discord: Join the community at discord.gg/WeJM5FP9GG
- Documentation: Visit baileys.wiki for guides and tutorials
- GitHub: Report issues and contribute at WhiskeySockets/Baileys
For business or enterprise-level support, you can book time with the current maintainer. See the GitHub repository for details.