baileys-whatsapp-api

Deploy

Install

git clone https://github.com/danarn17/baileys-whatsapp-api danarn17
cd danarn17
npm install

Setup new instance

npm start

Make a post to http://localhost:3000/new with:

{
  "webhook": "https://123412341234.ngrok.io/"
}

You can get a free subdomain to proxy the request to your localhost:

You don't need to respond to that request, copying the log from the ngrok dashboard is enough.

The QRcode will be sent to the webhook. You will need to transform it into an image. You can use:

The QRcode has a 20 seconds life.

You can read the QRCode from the terminal too.

routes

  • GET {host}/ hello world
  • GET {host}/:number/up start baileys
  • GET {host}/:number/down stop bailes

API documentation

There is no authentication