/newwaapi

newwaapi is an alternative mywaapi but using Baileys and yeah, it's Unofficial WhatsApp API made by me on NodeJs

Primary LanguageJavaScriptMIT LicenseMIT

mywaapi

newwaapi is an alternative mywaapi but using Baileys and yeah, it's Unofficial WhatsApp API made by me on NodeJs

Logo

Thanks for :

Installation

I'm always run this project using NodeJs version 16, so use NodeJs version 16 for better experience

Clone the project

  git clone https://github.com/yama24/newwaapi.git

or you can download the stable version from Here.

Go to the project directory

  cd newwaapi

Install dependencies

  yarn install

Create config file from example and edit it as you want

  cp config.json.example config.json

To login/scan the QR code, run the command :

  yarn start:dev

then scan qrCode from terminal. And when the bot is logged in, you can stop the bot and run the command :

  yarn start

for production mode

List of scripts in package.json file

  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "pm2 start index.js --name newwaapi -- pm2",
    "start:dev": "nodemon index.js nodemon",
    "restart": "pm2 restart newwaapi",
    "stop": "pm2 stop newwaapi",
    "status": "pm2 show newwaapi",
    "kill": "pm2 delete newwaapi",
    "logs": "pm2 logs newwaapi --lines 1000"
  }

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

  GET /info

Config list

  GET /get-config

Check is the number registered

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

Send media to contact/group

  POST /send-media
Parameter Type Description
number string Required. destination number/group id
file string Required. url or base64 url data
caption string file captions
name string file name (work for document file)

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.

Get list of groups

  GET /get-groups

Newwaapi Library

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

🚀 About Me

I am Yayan Maulana, Web Developer from Bogor, Indonesia. I have a lot of experience in building web-based application systems like ERP, CRM. E-Commerce, etc. 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