Skip to content
/ mywaapi Public

Unofficial WhatsApp API made by me on NodeJs

Notifications You must be signed in to change notification settings

yama24/mywaapi

Repository files navigation

mywaapi

Unofficial WhatsApp API made by me on NodeJs

Logo

Thanks for :

Installation

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

API Reference

Send message to contact

  POST /send-message
Parameter Type Description
number string Required. destination number
message string Required. message you want to send

Bot info

  POST /info

Check is the number registered

  POST /is-registered
Parameter Type Description
number string Required. target number

Set webhook/callback

  POST /set-webhook
Parameter Type Description
url string Required. webhook url

Get webhook/callback

  POST /get-webhook

Send media to contact/group

  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

Send message to group

  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.

Clear message from chat

  POST /clear-message
Parameter Type Description
number string Required. target number/group id

Delete chat

  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

Mywaapi Library

if you want it to be simpler and easier, use the following library to integrate mywaapi into your system

🚀 About Me

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.

linkedin

ko-fi