WEBJS
Overview
A WhatsApp API client that connects through the WhatsApp Web browser app. It uses Puppeteer to run a real instance of Whatsapp Web to avoid getting blocked.
👉 WAHA uses WhatsApp WebJS engine by default (if you don’t set WHATSAPP_DEFAULT_ENGINE
environment variable to
another engine).
⚠ Read the article before using WEBJS engine How to avoid blocking ->.
Run WEBJS
# Plus
docker run -v `pwd`/.sessions:/app/.sessions -e "WHATSAPP_DEFAULT_ENGINE=WEBJS" devlikeapro/waha-plus
# Core
docker run -it -e "WHATSAPP_DEFAULT_ENGINE=WEBJS" devlikeapro/waha
Configuration
You can use the following environment variables to configure the global behavior of the WEBJS engine:
WAHA_WEBJS_CACHE_TYPE=local
- enable cache (aka use the latest version) for the web page in the browser. By default, it’snone
(no cache)WAHA_WEBJS_WEB_VERSION=2.3000.XXXX
- set the version of the WhatsApp Web to use. By default, we’re using the latest compatible version. Only works withlocal
cache type.WAHA_WEBJS_PUPPETER_ARGS=--single-process
- Add custom puppeter arguments so you can test it affects without waiting a new release (use it with cation)
Session Config
You can configure WEBJS-specific options per session via config.webjs
.
tagsEventsOn
— Enable emission of specialtag:*
engine 🔄 Events - required forpresence.update
andmessage.ack
.
WARNING: Enabling tagsEventsOn
this may have a performance and stability impact. Disabled by default.
{
"name": "default",
"config": {
"webjs": {
"tagsEventsOn": false
}
}
}