Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 1.16 KB

README.md

File metadata and controls

44 lines (29 loc) · 1.16 KB

WHATSAPP API

It is inspired base on https://github.com/pedroslopez/whatsapp-web.js

RUN THE SCRIPT

  1. npm install.
  2. access to /generate (GET REQUEST) to generate QR code for Whatsapp API.
  3. scan the QR Code.
  4. After you got the "Client is Ready!" response in the console, you can now send message or send media message to other Whatsapp User.

SEND MESSAGE

Make a POST REQUEST to /send with json body num and message.

Example :

{"num" : "6285267671232", "message": "Hello world"}

Please note that the phone number format is an international format without + sign.

SEND MEDIA MESSAGE

Make a POST REQUEST to /sendMedia with json body file (url), message and num.

Example :

{"num": "6285267671232", "message": "Hello world", "file": "https://i.ibb.co/TMxrFp2/Screenshot-20201130-235450-Whats-App.jpg"}

Please note that the phone number format is an international format without + sign.

TIPS

if you want to send a message or media message to a lot of numbers, you can add multiple number with , sign.

Example :

{"num" : "6285267671232, 6287867651234", "message": "Hello world"}