What is whatsapp-web.js?
whatsapp-web.js is an open-source Node.js client library for WhatsApp. The repository describes it as a WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app. It uses Puppeteer to access WhatsApp Web's internal functions and runs them in a managed browser instance, so it works as an unofficial client and not as an official WhatsApp service.
Developers install it with npm, yarn or pnpm, and it requires Node.js v18.0.0 or higher. The feature table lists multi-device support, sending and receiving messages and media, message replies, mentions, group management, contact information and polls. Sending video requires Google Chrome, and sending buttons and lists is marked as deprecated. The README points to authentication strategies for saving and restoring sessions.
The code is released under the Apache-2.0 license. The project is not affiliated with WhatsApp, and its disclaimer states that WhatsApp does not allow bots or unofficial clients on its platform, so using it is not guaranteed to avoid being blocked.
Key capabilities
- Messaging Send and receive messages, reply to messages, mention users and add reactions.
- Media exchange Send and receive images, audio and documents; sending video requires Google Chrome.
- Group administration Join groups through invitations, modify group settings and manage participants and administrator roles.
- Contact and chat controls Retrieve contact information and profile pictures, mute chats and block or unblock contacts.
- Polls and channels Create polls, vote in polls and interact with channels.
- Session handling Initialize authenticated browser sessions, with documented strategies for saving and restoring sessions.
Where whatsapp-web.js fits
The library fits developer-built messaging applications and event-driven workflows that need to receive WhatsApp messages and respond programmatically. It also exposes group and contact operations for custom tooling running in a developer-managed Node.js environment.
Before deployment, teams should assess the risk of account blocking, verify authentication and session recovery, and test the specific messaging and media operations they need. The issue tracker contains reports concerning synchronization, media handling and session readiness. Sending video requires Google Chrome, while sending buttons and lists is marked unsupported and deprecated.
Install
npm install whatsapp-web.jsReviews of whatsapp-web.js
Be the first to share your experience with whatsapp-web.js.
Write a review
Loading review form…
