Gathering detailed insights and metrics for whatsapp-web.js
Gathering detailed insights and metrics for whatsapp-web.js
Gathering detailed insights and metrics for whatsapp-web.js
Gathering detailed insights and metrics for whatsapp-web.js
wwebjs-mongo
A MongoDB plugin for whatsapp-web.js library
wwebjs-aws-s3
A plugin for remote authentication on whatsapp-web.js and store session data on AWS S3.
@deathabyss/wwebjs-sender
A package to send messages/buttons using constructors with the whatsapp-web.js package
wwebjs-google-cloud-storage
A Google Cloud Storage plugin for whatsapp-web.js!
npm install whatsapp-web.js
61
Supply Chain
94.8
Quality
88.6
Maintenance
50
Vulnerability
95.4
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
15,612 Stars
710 Commits
3,723 Forks
335 Watching
8 Branches
112 Contributors
Updated on 29 Nov 2024
JavaScript (99.43%)
Shell (0.57%)
Cumulative downloads
Total Downloads
Last day
1.9%
3,320
Compared to previous day
Last week
-5.7%
21,252
Compared to previous week
Last month
4.2%
98,504
Compared to previous month
Last year
32.6%
946,592
Compared to previous year
10
A WhatsApp API client that connects through the WhatsApp Web browser app
The library works by launching the WhatsApp Web browser application and managing it using Puppeteer to create an instance of WhatsApp Web, thereby mitigating the risk of being blocked. The WhatsApp API client connects through the WhatsApp Web browser app, accessing its internal functions. This grants you access to nearly all the features available on WhatsApp Web, enabling dynamic handling similar to any other Node.js application.
[!IMPORTANT] It is not guaranteed you will not be blocked by using this method. WhatsApp does not allow bots or unofficial clients on their platform, so this shouldn't be considered totally safe.
The module is now available on npm! npm i whatsapp-web.js
[!NOTE] Node
v18+
is required.
Just get the latest LTS from the official node website.
1sudo npm install -g n 2sudo n stable
1choco install nodejs-lts
1winget install OpenJS.NodeJS.LTS
1curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - &&\ 2sudo apt-get install -y nodejs
1const { Client } = require('whatsapp-web.js'); 2 3const client = new Client(); 4 5client.on('qr', (qr) => { 6 // Generate and scan this code with your phone 7 console.log('QR RECEIVED', qr); 8}); 9 10client.on('ready', () => { 11 console.log('Client is ready!'); 12}); 13 14client.on('message', msg => { 15 if (msg.body == '!ping') { 16 msg.reply('pong'); 17 } 18}); 19 20client.initialize();
Take a look at example.js for another examples with additional use cases.
For further details on saving and restoring sessions, explore the provided Authentication Strategies.
Feature | Status |
---|---|
Multi Device | ✅ |
Send messages | ✅ |
Receive messages | ✅ |
Send media (images/audio/documents) | ✅ |
Send media (video) | ✅ (requires Google Chrome) |
Send stickers | ✅ |
Receive media (images/audio/video/documents) | ✅ |
Send contact cards | ✅ |
Send location | ✅ |
Send buttons | ❌ (DEPRECATED) |
Send lists | ❌ (DEPRECATED) |
Receive location | ✅ |
Message replies | ✅ |
Join groups by invite | ✅ |
Get invite for group | ✅ |
Modify group info (subject, description) | ✅ |
Modify group settings (send messages, edit info) | ✅ |
Add group participants | ✅ |
Kick group participants | ✅ |
Promote/demote group participants | ✅ |
Mention users | ✅ |
Mention groups | ✅ |
Mute/unmute chats | ✅ |
Block/unblock contacts | ✅ |
Get contact info | ✅ |
Get profile pictures | ✅ |
Set user status message | ✅ |
React to messages | ✅ |
Create polls | ✅ |
Vote in polls | 🔜 |
Communities | 🔜 |
Channels | 🔜 |
Something missing? Make an issue and let us know!
Feel free to open pull requests; we welcome contributions! However, for significant changes, it's best to open an issue beforehand. Make sure to review our contribution guidelines before creating a pull request. Before creating your own issue or pull request, always check to see if one already exists!
You can support the maintainer of this project through the links below
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. Also it is not guaranteed you will not be blocked by using this method. WhatsApp does not allow bots or unofficial clients on their platform, so this shouldn't be considered totally safe.
Copyright 2019 Pedro S Lopez
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this project except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
27 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 20/29 approved changesets -- score normalized to 6
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More