Unofficial WhatsApp API made by me on NodeJs
- axios
- express
- express-fileupload
- express-validator
- nodemon
- node-qrcode
- qrcode-terminal
- socket.io
- whatsapp-web.js
Before installation, make sure NodeJs version 12 or higher and npm is installed
Clone the project
git clone https://github.com/yama24/mywaapi.git
Go to the project directory
cd mywaapi
Install dependencies
npm install
Start the server
npm run start
and for the Dev mode
npm run start:dev
then open http://localhost:8000/ for scaning qrCode or scaning qrCode from terminal
POST /send-message
Parameter | Type | Description |
---|---|---|
number |
string |
Required. destination number |
message |
string |
Required. message you want to send |
POST /info
POST /is-registered
Parameter | Type | Description |
---|---|---|
number |
string |
Required. target number |
POST /set-webhook
Parameter | Type | Description |
---|---|---|
url |
string |
Required. webhook url |
POST /get-webhook
POST /send-media
Parameter | Type | Description |
---|---|---|
number |
string |
Required. destination number/group id |
caption |
string |
Required. required captions |
file |
string |
Required. url or base64 file format |
POST /send-group-message
Parameter | Type | Description |
---|---|---|
id |
string |
Required. destination number (6289861821283-1627374981@g.us) |
message |
string |
Required. message you want to send |
The group id can be obtained by sending a !groups message to the bot. then the bot will send all group data in which there are bots and you.
POST /clear-message
Parameter | Type | Description |
---|---|---|
number |
string |
Required. target number/group id |
POST /delete-chat
Parameter | Type | Description |
---|---|---|
number |
string |
Required. target number/group id |
Hidden Feature
Do this by sending a message to the bot
Message | Response |
---|---|
!ping | pong |
!sendto 6289861821283 this is the message | bot will send message 'this is the message' to '6289861821283' |
!info | an information about bot |
!buttons | an example buttons of WhatsApp (under maintenance) |
!lists | an example list of WhatsApp |
!game | a simple multiple choice game (change question and answer in game.js) |
!groups | a list of groups that you and the bot follow |
!webver | a version of the WhatsApp Web |
!help | a list of bot commands |
if you want it to be simpler and easier, use the following library to integrate mywaapi into your system
I am Yayan Maulana, Web Developer from Bandung, Indonesia. I have a lot of experience in building web-based application systems. I am also a fast learner. Everything can be learned except for something I don't want to learn. Give me space, time and internet access so I can be anything.