# whiskeysockets/baileys

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/whiskeysockets-baileys).**

8,275 stars · 2,715 forks · JavaScript · mit

## Links

- GitHub: https://github.com/WhiskeySockets/Baileys
- Homepage: https://baileys.wiki/
- awesome-repositories: https://awesome-repositories.com/repository/whiskeysockets-baileys.md

## Topics

`bun` `deno` `nodejs` `reverse-engineering` `typescript` `websockets` `whatsapp-web` `ws`

## Description

Baileys is a TypeScript API client library used to interact with the WhatsApp Web API via WebSockets without requiring a browser. It functions as a real-time communication tool that handles bidirectional data exchange and event-based socket connections.

The project includes a dedicated toolkit for managing WhatsApp Business profiles and product catalogs, alongside a session manager that authenticates accounts using QR codes or pairing codes and persists session state to disk.

Its capabilities cover a wide range of messaging functions, including multi-type message transmission, chat history synchronization, and group membership management. It also provides tools for identity management, account privacy configuration, and the handling of media content through data streams.

The library is implemented as an asynchronous messaging framework using an event-emitter pattern to handle incoming messages and real-time socket events.

## Tags

### Networking & Communication

- [WhatsApp Integrations](https://awesome-repositories.com/f/networking-communication/api-integration-frameworks/communication-apis/messaging-platform-integrations/whatsapp-integrations.md) — Provides a comprehensive TypeScript library for integrating with the WhatsApp messaging platform via WebSockets.
- [Text Message Transmission](https://awesome-repositories.com/f/networking-communication/text-message-transmission.md) — Implements the core capability of transmitting text and media content to users and groups. ([source](https://baileys.wiki/docs/category/socket))
- [Real-time Messaging](https://awesome-repositories.com/f/networking-communication/communication-platforms-services/communication-platforms/real-time-collaboration-suites/real-time-messaging.md) — Facilitates the reception of incoming messages and account events to trigger immediate application responses. ([source](https://baileys.wiki/docs/category/socket))
- [Account Authentication Gateways](https://awesome-repositories.com/f/networking-communication/communication-platforms-services/messaging-notification-systems/messaging-automation/account-authentication-gateways.md) — Provides mechanisms to link messaging accounts via QR codes or pairing codes for automated access. ([source](https://cdn.jsdelivr.net/gh/whiskeysockets/baileys@master/README.md))
- [Messaging Client Connections](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/communication-protocols-standards/network-protocols/connection-establishment-protocols/messaging-client-connections.md) — Establishes WebSocket connections to remote servers for real-time bidirectional data exchange. ([source](https://baileys.wiki/docs/category/socket))
- [WebSocket Event Systems](https://awesome-repositories.com/f/networking-communication/distributed-systems-p2p/distributed-computing/communication-protocols/websocket-implementations/websocket-event-systems.md) — Implements low-level callbacks for specific WebSocket tags and attributes to manage custom data routing. ([source](https://cdn.jsdelivr.net/gh/whiskeysockets/baileys@master/README.md))
- [Messaging API Integrations](https://awesome-repositories.com/f/networking-communication/messaging-api-integrations.md) — Provides an asynchronous and event-based WebSocket connection to interact with the messaging API. ([source](https://baileys.wiki/docs/intro))
- [Rich Message Types](https://awesome-repositories.com/f/networking-communication/messaging-exchange-frameworks/rich-message-types.md) — Supports a wide variety of rich message payloads, including text, locations, contacts, polls, and media. ([source](https://cdn.jsdelivr.net/gh/whiskeysockets/baileys@master/README.md))
- [Real-time Event Streams](https://awesome-repositories.com/f/networking-communication/real-time-event-streams.md) — Uses an emitter pattern to register callbacks that react to incoming messages and chat updates in real-time. ([source](https://cdn.jsdelivr.net/gh/whiskeysockets/baileys@master/README.md))
- [WebSocket Clients](https://awesome-repositories.com/f/networking-communication/websocket-clients.md) — Provides a WebSocket client for establishing bidirectional connections and handling real-time data exchange for messaging.
- [Account Pairing Codes](https://awesome-repositories.com/f/networking-communication/account-pairing-codes.md) — Generates pairing codes for specific phone numbers to establish a secure connection with the account. ([source](https://baileys.wiki/docs/api/functions/makeWASocket))
- [Business Account Configuration](https://awesome-repositories.com/f/networking-communication/business-account-configuration.md) — Includes a toolkit for configuring business-entity account profiles, including professional details and product catalogs.
- [Business Account Integration](https://awesome-repositories.com/f/networking-communication/chat-bot-integrations/business-account-integration.md) — Enables integration with professional business accounts to access specialized high-tier messaging capabilities. ([source](https://baileys.wiki/docs/category/socket))
- [Chat Session Management](https://awesome-repositories.com/f/networking-communication/chat-session-management.md) — Provides tools for managing chat properties, including archiving, muting, pinning, and deleting conversations. ([source](https://cdn.jsdelivr.net/gh/whiskeysockets/baileys@master/README.md))
- [Broadcast Messaging](https://awesome-repositories.com/f/networking-communication/communication-platforms-services/real-time-communication/broadcast-messaging.md) — Supports distributing messages to broadcast lists and posting ephemeral updates to status lists. ([source](https://cdn.jsdelivr.net/gh/whiskeysockets/baileys@master/README.md))
- [Participant Management](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/communication-paradigms/group-membership-management/participant-management.md) — Provides tools for creating groups and managing participant lifecycles, including promotions and removals. ([source](https://cdn.jsdelivr.net/gh/whiskeysockets/baileys@master/README.md))
- [Community Management](https://awesome-repositories.com/f/networking-communication/community-management.md) — Provides capabilities to create, join, leave communities, and configure group linking and invite settings. ([source](https://baileys.wiki/docs/api/functions/makeWASocket))
- [Contact Management](https://awesome-repositories.com/f/networking-communication/contact-management.md) — Provides utilities for creating, editing, and removing contact information associated with user identities. ([source](https://baileys.wiki/docs/api/functions/makeWASocket))
- [User Profile Retrieval](https://awesome-repositories.com/f/networking-communication/contact-management/user-profile-retrieval.md) — Offers APIs for retrieving detailed user attributes and business profile data by unique identifier. ([source](https://cdn.jsdelivr.net/gh/whiskeysockets/baileys@master/README.md))
- [Chat Synchronization](https://awesome-repositories.com/f/networking-communication/media-synchronization/chat-synchronization.md) — Synchronizes historical chats, contacts, and messages to populate the local client state after connection. ([source](https://baileys.wiki/docs/category/socket))
- [Message Content Modification](https://awesome-repositories.com/f/networking-communication/message-content-modification.md) — Enables updating the text and media content of messages after they have been transmitted. ([source](https://cdn.jsdelivr.net/gh/whiskeysockets/baileys@master/README.md))
- [Message Receipt Transmission](https://awesome-repositories.com/f/networking-communication/message-receipt-transmission.md) — Allows sending read, delivery, and call receipts for single or multiple messages via bulk transmission. ([source](https://baileys.wiki/docs/api/functions/makeWASocket))
- [History Retrieval](https://awesome-repositories.com/f/networking-communication/messaging-channel-management/history-retrieval.md) — Fetches and filters historical messages from conversations starting from specific message keys. ([source](https://cdn.jsdelivr.net/gh/whiskeysockets/baileys@master/README.md))
- [Rich Media Transmission](https://awesome-repositories.com/f/networking-communication/rich-media-transmission.md) — Transmits diverse content types including images, videos, audio, and GIFs using memory-efficient buffers and streams. ([source](https://cdn.jsdelivr.net/gh/whiskeysockets/baileys@master/README.md))

### Web Development

- [Real-Time Communication](https://awesome-repositories.com/f/web-development/real-time-communication.md) — Establishes a persistent, bidirectional WebSocket connection for real-time data exchange with the messaging server.
- [Asynchronous Messaging Frameworks](https://awesome-repositories.com/f/web-development/asynchronous-messaging-frameworks.md) — Functions as an asynchronous messaging framework using an event-emitter pattern to handle real-time socket events.

### Data & Databases

- [Local Persistence](https://awesome-repositories.com/f/data-databases/flat-file-storage/local-persistence.md) — Stores authentication credentials and session keys in the local file system to maintain connections across restarts.
- [Binary Serialization](https://awesome-repositories.com/f/data-databases/binary-serialization.md) — Implements encoding and decoding of data structures into binary buffers for efficient transmission over the network wire.

### Programming Languages & Runtimes

- [Event Emitters](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/runtime-environments/runtimes/asynchronous-execution-engines/event-emitters.md) — Uses an event-emitter pattern to trigger callbacks upon receiving real-time socket events and messages.

### Security & Cryptography

- [Authentication Managers](https://awesome-repositories.com/f/security-cryptography/authentication-managers.md) — Manages the lifecycle and retrieval of user credentials and session keys to maintain active connections. ([source](https://baileys.wiki/docs/intro))
- [Session State Persistence](https://awesome-repositories.com/f/security-cryptography/identity-authentication/identity-based-authentication/session-state-persistence.md) — Persists authentication state and session identifiers to local storage to avoid repeated authentication. ([source](https://baileys.wiki/docs/api/functions/useMultiFileAuthState))
- [Persistent Session Managers](https://awesome-repositories.com/f/security-cryptography/user-account-management/persistent-session-managers.md) — Ships a session manager that persists authentication tokens and session state to disk to avoid repeated QR scans.
- [User Profile Management](https://awesome-repositories.com/f/security-cryptography/identity-access-management/identity-management/user-management/user-profile-management.md) — Enables updating account names, status messages, and profile pictures for users and group identities. ([source](https://baileys.wiki/docs/api/functions/makeWASocket))
- [Multi-Device Synchronization](https://awesome-repositories.com/f/security-cryptography/multi-device-synchronization.md) — Implements architectures for maintaining consistent session state across multiple recipient devices to ensure message delivery. ([source](https://baileys.wiki/docs/api/functions/makeWASocket))

### Business & Productivity Software

- [Business Profiles](https://awesome-repositories.com/f/business-productivity-software/business-profiles.md) — Allows retrieving and updating business profiles, including product catalogs and order information. ([source](https://baileys.wiki/docs/api/functions/makeWASocket))

### Graphics & Multimedia

- [Media Downloaders](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/media-downloaders.md) — Fetches digital media files from received messages as streams or buffers for local storage. ([source](https://cdn.jsdelivr.net/gh/whiskeysockets/baileys@master/README.md))
- [Memory-Efficient Media Streaming](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/media-manipulation/media-processing/streaming-network-frameworks/media-stream-processing/memory-efficient-media-streaming.md) — Processes large images and videos as data streams to minimize memory consumption during upload and download.

### User Interface & Experience

- [Message Moderation & Interaction](https://awesome-repositories.com/f/user-interface-experience/chat-message-utilities/message-moderation-interaction.md) — Provides administrative actions to remove previously sent messages for all recipients in a chat. ([source](https://cdn.jsdelivr.net/gh/whiskeysockets/baileys@master/README.md))
