7.0.0 起有破坏性变更,升级前需查阅官方迁移文档;README 未给出安装命令,需自行参考 npm 包 baileys 或新指南 baileys.wiki;项目与 WhatsApp 官方无关,使用需自行承担违反其服务条款的风险
Baileys
WhiskeySocketsMIT活跃维护基于 WebSocket 的 TypeScript/JavaScript 库,无需浏览器即可接入 WhatsApp Web,方便开发者构建聊天机器人和消息自动化服务。
Socket-based TS/JavaScript API for WhatsApp Web
README 里没有找到可直接复制的安装命令,请到 README 或官方文档查看安装方式。
README 未说明
基于 WebSocket 的 TypeScript 库,用来对接 WhatsApp Web API,免去自己逆向协议
基于 WebSocket 的 TypeScript/JavaScript 库,无需浏览器即可接入 WhatsApp Web,方便开发者构建聊天机器人和消息自动化服务。
核心能力
- 用 WebSocket 连接 WhatsApp Web API
- 提供 TypeScript 类型定义的 JS/TS 接口
- 7.0.0 起引入多项破坏性变更并附迁移指引
- MIT 许可,可自由修改与分发
容易踩的坑
- v7.0.0-rc14最新正式版2026-07-29 · 2026-07-29 01:14 UTC
这个版本没有写更新说明。
- v6.7.242026-07-29 · 2026-07-29 00:57 UTC
- v7.0.0-rc132026-05-21 · 2026-05-21 19:49 UTC
查看更新说明
Version 7.0.0-rc13
This RC ships a really small bugfix that fixes a regression in protocolMessage parsing because WhatsApp changed its node behavior a few months ago and no one on Baileys team caught it, this guard that we enforced yesterday on the function therefore failed because fromMe was being set to false.
What's Changed
- Modify e2e workflow triggers for branches by @purpshell in https://github.com/WhiskeySockets/Baileys/pull/2583
Full Changelog: https://github.com/WhiskeySockets/Baileys/compare/v7.0.0-rc12...v7.0.0-rc13
- v7.0.0-rc122026-05-20 · 2026-05-20 17:23 UTC
查看更新说明
7.0.0-rc12
This version patches the security flaw addressed in GHSA-qvv5-jq5g-4cgg. Please exercise extreme caution and upgrade to the latest version or latest legacy version (6.7.22).
- v7.0.0-rc112026-05-13 · 2026-05-13 08:35 UTC
查看更新说明
A quick release meant to pin the libsignal pipeline to the NPM registry. The release also includes a small bug fix for old VPSes lacking SIMD support for the WASM. We moved Baileys's dep from git to NPM:
- This should remove the need to install git to install baileys.
- This should increase code transparency & security as libsignal now goes under the same Trusted Publishing and Provenance as Baileys rc10.
Read the full rc10 patch notes here: https://github.com/WhiskeySockets/Baileys/releases/tag/v7.0.0-rc10
We are working on migrating away from the libsignal dep as soon as possible to our own Rust-based equivalent to prevent licensing issues. Note that libsignal is in GPLv3 but Baileys is under MIT (Adhiraj left us a mess 😓).
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
[!CAUTION] NOTICE OF BREAKING CHANGE.
As of 7.0.0, multiple breaking changes were introduced into the library.
Please check out https://whiskey.so/migrate-latest for more information.
Baileys is a WebSockets-based TypeScript library for interacting with the WhatsApp Web API.
Join the WhiskeySockets community via the link: https://whiskey.so/discord
Usage & Guide
[!IMPORTANT] The new guide is a work in progress. Expect missing pages/content. Report missing or incorrect content.
You can still access the old guide here: README.md, or the NPM homepage.
The new guide is posted at https://baileys.wiki .
Get Support
If you'd like business to enterprise-level support from Rajeh, the current maintainer of Baileys, you can book a video chat. Book a 1 hour time slot by contacting him on Discord or pre-ordering here. The earlier you pre-order the better, as his time slots usually fill up very quickly. He offers immense value per hour and will answer all your questions before the time runs out.
If you are a business, we encourage you to contribute back to the high development costs of the project and to feed the maintainers who dump tens of hours a week on this. You can do so by booking meetings or sponsoring below. All support, even in bona fide / contribution hours, is welcome by businesses of all sizes. This is not condoning or endorsing businesses to use the library. See the Disclaimer below.
Sponsor
If you'd like to financially support this project, you can do so by supporting the current maintainer here.
Disclaimer
[!CAUTION] 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. "WhatsApp" as well as related names, marks, emblems and images are registered trademarks of their respective owners.
The maintainers of Baileys do not in any way condone the use of this application in practices that violate the Terms of Service of WhatsApp. The maintainers of this application call upon the personal responsibility of its users to use this application in a fair way, as it is intended to be used. Use at your own discretion. Do not spam people with this. We discourage any stalkerware, bulk or automated messaging usage.
License
Copyright (c) 2026 Rajeh Taher/WhiskeySockets
Licensed under the MIT License: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Thus, the maintainers of the project can't be held liable for any potential misuse of this project.