Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 1.03 KB

README.md

File metadata and controls

58 lines (40 loc) · 1.03 KB

Whatsapp API

WhatsApp Chatbot with Node.js and Whatsapp.js

REFERENCE

Installation

Make sure to install the dependencies:

# npm
npm install

# pnpm
pnpm install

# yarn
yarn install

Development Server

Start the development server on http://localhost:8000:

Or you can edit this line of code to change port

// initial instance
const PORT = process.env.PORT || 8000;

How it works?

  1. After installation, run the app with
# npm
npm run start

# pnpm
pnpm run start

# yarn
yarn start
  1. Wait until QR code shown at http://localhost:8000 and scan with your phone to login whatsapp
  2. To send message, use this CURL. Modify phone for target phone number and message for message you want to send
curl --location 'http://localhost:8000/send' \
--header 'Content-Type: application/json' \
--data-raw '{
    "phone": "[email protected]",
    "message": "Test Send Message"
}'