NodeJS: 16++
For Linux Server
install no-gui systems ( ignore if Windows )
sudo apt install -y gconf-service libgbm-dev libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
git clone https://git.bintangtechnology.com/microservices/whatsapp-gateway.git
PORT=3000
SERVER_OS=LINUX # WINDOWS OR LINUX default is LINUX
HEADLESS=true # default true
ACCESS_TOKEN=
To run with pm2, first install pm2 globally
npm install pm2@latest -g
running scripts
Header
Type
Description
ACCESS_TOKEN
string
Required . Your ACCESS_TOKEN
response
type
description
message
string
message
state
string
READY
or NOT_READY
is_initialize
boolean
true
when puppeter is already launched
is_auth
boolean
true
when whatsapp is linked
is_loading
boolean
true
when puppeter is opening web whatsapp
is_ready
boolean
true
when app is ready to send message
qr_code
string
null
when client is already login
client_info
Object
null
when client is not ready
Initialize puppetter if needed
response
type
description
message
string
message
response
type
description
message
string
message
response
type
description
message
string
message
body
type
example
to
number
621234567890
must include country code
message
string
any
response
type
description
message
string
message
Realtime Status Subscribe (PRIVATE WITH TOKEN)
body
type
example
client_id
string
client_id
from /sse/realtime