# Baileys ## Docs - [Handle WhatsApp calls](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/advanced/calls.md): Listen for incoming calls and reject them with Baileys. - [Extend Baileys with custom functionality](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/advanced/custom-functionality.md): Register raw WebSocket callbacks, enable debug logging, and understand the binary node protocol WhatsApp uses to communicate with Baileys. - [Sync chat history](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/advanced/history-sync.md): Receive chats, contacts, and messages from before the link via the messaging-history.set event, and request more on demand with fetchMessageHistory. - [Troubleshoot common Baileys issues](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/advanced/troubleshooting.md): Diagnose and fix common Baileys problems: connection drops, QR code failures, message delivery issues, session expiry, and media upload errors. - [USync protocol](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/advanced/usync.md): Use the USync protocol (and MEX) to query WhatsApp for user metadata, LID/PN mappings, device lists, and other directory data. - [Connect with a pairing code](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/authentication/pairing-code.md): Link Baileys to WhatsApp Web without scanning a QR code using a 8-digit pairing code entered on your phone. Covers phone number format and setup flow. - [Connect with a QR code](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/authentication/qr-code.md): Authenticate your Baileys socket by scanning a QR code in the WhatsApp mobile app. Covers the connection.update event, browser config, and rendering options. - [Save and restore WhatsApp sessions](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/authentication/session-management.md): Persist your Baileys auth credentials to disk so you never need to re-scan the QR code. Covers useMultiFileAuthState and custom auth store patterns. - [Contributing to Baileys](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/community/contributing.md): How to contribute code, documentation, and translations to the Baileys project. - [Sponsor Baileys](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/community/sponsor.md): Support continued development of Baileys and unlock sponsor perks. - [Translations](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/community/translations.md): Help translate the Baileys documentation into more languages. - [Implement a data store for Baileys](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/concepts/data-store.md): Baileys has no built-in persistence. Learn to use the in-memory store or build a custom data store for chats, messages, and contacts in your app. - [Handle real-time events with Baileys](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/concepts/events.md): Baileys emits typed events for messages, connection state, groups, contacts, and more. Learn how to listen, batch process, and handle each event type. - [WhatsApp JIDs explained](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/concepts/jids.md): JIDs (Jabber IDs) are how WhatsApp identifies users, groups, and broadcasts in Baileys. Learn the formats, the PN/LID duality, and helper functions for working with JIDs. - [Configure the Baileys socket connection](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/concepts/socket-config.md): Explore all SocketConfig options in Baileys: auth, browser, logger, caching, retries, timeouts, and more. Tune your socket for production use. - [FAQ](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/faq.md): Frequently asked questions about using Baileys, ranging from connection quirks and message delivery to LIDs and history sync. - [Send broadcast messages and WhatsApp Stories with Baileys](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/features/broadcasts-stories.md): Publish WhatsApp Status updates and send messages to broadcast lists using Baileys. Covers statusJidList, broadcast mode, and supported content types. - [Create, configure, and manage WhatsApp groups in Baileys](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/features/groups.md): Create and manage WhatsApp groups: add or remove participants, update settings, manage invites, approve join requests, and toggle ephemeral messages. - [Subscribe to and broadcast WhatsApp presence updates](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/features/presence.md): Track whether contacts are online, typing, or recording using Baileys presence subscriptions. Learn sock.presenceSubscribe and the presence.update event. - [Configure WhatsApp privacy and block settings in Baileys](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/features/privacy.md): Block users, configure last seen visibility, read receipts, profile picture access, and default disappearing mode using Baileys privacy methods. - [Install Baileys in your Node.js project](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/installation.md): Step-by-step guide to install Baileys using npm, yarn, or the edge version from GitHub. Covers Node.js version requirements and optional dependencies. - [Baileys: WhatsApp Web API library for Node.js](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/introduction.md): Baileys connects to WhatsApp Web over a WebSocket without a browser. Build bots, automate chats, and handle real-time events in TypeScript. - [Manage chats: archive, mute, pin, and delete](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/messaging/chat-management.md): Use chatModify to archive, mute, mark read, pin, star, or delete WhatsApp chats and messages. Reference for all supported chat modification operations. - [Send and receive media in WhatsApp](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/messaging/media-messages.md): Send images, videos, audio, documents, and GIFs with Baileys. Learn WAMediaUpload types, thumbnail generation, and how to download received media. - [Edit, delete, and read WhatsApp messages](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/messaging/message-actions.md): Delete messages for everyone, edit sent messages, mark messages as read, and update your typing or online presence using Baileys socket methods. - [Send WhatsApp messages with Baileys](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/messaging/sending-messages.md): Send text, links, contacts, locations, reactions, polls, and pin messages using sock.sendMessage. Full reference with working TypeScript examples. - [Migrate to Baileys v7](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/migration/v7.md): Breaking changes in Baileys 7.x: LIDs, removed ACKs, ESM-only builds, slimmed-down protobufs, and Meta Coexistence support. - [Migrate to Baileys v8](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/migration/v8.md): What to expect in Baileys v8: a class-based architecture, the upcoming whatsmeow integration, and a new authentication system that requires a one-time migration. - [Get started with Baileys](https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/quickstart.md): Build your first WhatsApp bot with Baileys in minutes. Learn to connect, handle events, save sessions, and send your first message step by step.