WACrew

Guide

Baileys: the TypeScript WhatsApp library explained

Baileys is an open-source TypeScript library that connects to WhatsApp as a linked device, with no browser. What it does, where you meet it and the most common mistake.

Updated 1 min read
On this page
  1. Where you meet it
  2. Common mistake
  3. Questions

Baileys is an open-source TypeScript library that talks to WhatsApp over the same protocol as WhatsApp Web. It joins your account as one more linked device and needs no browser, Selenium or Puppeteer.

The maintained project lives at WhiskeySockets/Baileys and ships on npm as baileys.

Where you meet it

You write a Node.js process, show a QR code or a pairing code, scan it with your phone, and the session is saved to a folder. From then on the library emits events such as new message, read receipt and group change, and takes commands to send text, media and reactions.

Many unofficial WhatsApp APIs and several WhatsApp MCP servers run on Baileys. So does WACrew: its collector is a Baileys process that stores every message and media file and delivers replies at a human pace.

Common mistake

Treating Baileys as the official API. It is not: Meta does not endorse third-party clients, so aggressive automation (bulk sends, cold outreach) can get the number banned. Answering people who already talk to you, at a human volume, carries far less risk.

Another one: pinning nothing. The 7.x line shipped as rc releases and the WhatsApp protocol changes. Pin a version and upgrade with a test.

Questions

Is Baileys free? Yes. The library is open source (MIT license). You pay only for the server it runs on.

Does my phone need to stay online? Not all the time. In multi-device mode the linked device works on its own, but WhatsApp logs out linked devices if the main phone goes about 14 days without use.

Baileys or whatsmeow? They are the TypeScript and Go takes on the same protocol. Pick by stack; see whatsmeow vs Baileys.

In Portuguese: Baileys.