Skip to main content
Baileys Logo

What is Baileys?

Bailey is a WebSocket-based TypeScript library for interacting with the WhatsApp Web API. It provides a complete, efficient solution for building WhatsApp automation without the overhead of browser automation tools.
Baileys connects directly to WhatsApp Web using WebSockets - no Selenium, Chromium, or browser required. This saves approximately half a gigabyte of RAM compared to browser-based solutions.

Key Features

Browser-Free

Direct WebSocket connection to WhatsApp Web - no Selenium or Chromium required

Multi-Device Support

Full support for WhatsApp’s multi-device and web versions

Memory Efficient

Saves ~500MB of RAM by eliminating browser overhead

TypeScript First

Written in TypeScript with complete type definitions

Rich Messaging

Send text, media, polls, reactions, locations, contacts, and more

Event-Driven

EventEmitter-based architecture for handling messages and events

Session Management

Built-in authentication state management with multi-file support

Group Management

Complete API for creating and managing WhatsApp groups

Authentication Methods

Baileys supports two authentication methods:

QR Code

Scan a QR code with your phone to authenticate

Pairing Code

Use a pairing code for authentication without QR scanning

What You Can Build

  • Customer Support Bots - Automated responses and ticket management
  • Notification Systems - Send alerts and updates to users
  • Group Management Tools - Automate group administration
  • Analytics Platforms - Track message metrics and engagement
  • Integration Bridges - Connect WhatsApp with other services
  • Broadcasting Tools - Send bulk messages to multiple recipients
Important: This project is not affiliated with WhatsApp. Use responsibly and in accordance with WhatsApp’s Terms of Service. Do not use for spam or unauthorized bulk messaging.

Installation

Install Baileys and get started

Quick Start

Send your first message in minutes

API Reference

Explore the complete API

Package Information

  • Package Name: @whiskeysockets/baileys
  • Current Version: 7.0.0 (release candidate)
  • License: MIT
  • Minimum Node.js: 20.0.0+
  • GitHub: WhiskeySockets/Baileys

Community & Support

Discord Community

Join our Discord server for help and discussions

GitHub Issues

Report bugs and request features

Disclaimer

This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with WhatsApp or any of its subsidiaries or its affiliates. The official WhatsApp website can be found at whatsapp.com. The maintainers of Baileys do not condone the use of this library in practices that violate WhatsApp’s Terms of Service. Users are responsible for using this library fairly and as intended. Do not spam people with this library.