Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rvgsibs/new-whats
https://github.com/rvgsibs/new-whats
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rvgsibs/new-whats
- Owner: rvgsibs
- Created: 2021-11-26T12:16:52.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-26T13:10:58.000Z (about 3 years ago)
- Last Synced: 2024-11-07T21:18:42.782Z (2 months ago)
- Language: JavaScript
- Size: 152 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Whatsapp API Tutorial
Hi, this is the implementation example of whatsapp-web.js
Watch the tutorials:
- Whatsapp API Tutorial: Part 1
- Whatsapp API Tutorial: Part 2
- Whatsapp API Tutorial: Tips & Tricks
- Whatsapp API Tutorial: Sending Media File
- Whatsapp API Tutorial: Deploy to Heroku
- Whatsapp API Tutorial: Multiple Device
- Whatsapp API Tutorial: Multiple Device | Part 2
- Whatsapp API Tutorial: Fix Heroku Session
- Whatsapp API Tutorial: Dynamic Message Reply### How to use?
- Clone or download this repo
- Enter to the project directory
- Run `npm install`
- Run `npm run start:dev`
- Open browser and go to address `http://localhost:3000`
- Scan the QR Code
- Enjoy!### Send message to group
You can send the message to any group by using `chatID` or group `name`, chatID will used if you specify the `id` field in the form, so if you want to send by `name`, only use name.
**Paramaters:**
- `id` (optional if name given): the chat ID
- `name` (optional): group name
- `message`: the messageHere the endpoint: `/send-group-message`
Here the way to get the groups info (including ID & name):
- Send a message to the API number `!groups`
- The API will replying with the groups info
- Use the ID to send a message### Downloading media
I add an example to downloading the message media if exists. Please check it in `on message` event!
We use `mime-types` package to get the file extension by it's mimetype, so we can download all of the type of media message.
And we decided (for this example) to use time as the filename, because the media filename is not certain exists.
## Support Me
You can make a support for this work by Karya Karsa. Thanks