Deploy a WhatsApp bot (Baileys, whatsapp-web.js or Cloud API)
Deploy a WhatsApp bot
WhatsApp bots are usually built one of two ways, and which one you're running changes how you set it up here.
Which kind of WhatsApp bot do you have?
- Unofficial library (Baileys, whatsapp-web.js, venom-bot): connects as if it were a real WhatsApp Web session, authenticated by scanning a QR code once. No Meta approval needed, but the session can occasionally need re-scanning if WhatsApp logs it out.
- Official WhatsApp Cloud API: a real Meta-provided API with an access token, no QR scanning, but requires a registered Meta Business/WhatsApp Business account and approved message templates for anything outside a 24-hour customer reply window.
Most hobby and small-business bots use the first kind โ the rest of this guide focuses on that.
1. Upload your code
Open Files and upload your project (or a .zip, then Extract). Make sure package.json is included.
2. Start it and scan the QR code
Set the startup file in Startup, then press Start and open the Console. Unofficial libraries print a QR code to the console on first run โ scan it from WhatsApp on your phone under Linked Devices within the short time window shown before it expires.
3. Keep the session
Most libraries save session/auth data to a local folder (e.g. auth_info/ or session/) so you don't have to re-scan on every restart. Don't delete that folder unless you want to re-link.
4. If you get logged out
WhatsApp occasionally invalidates a linked session (too many devices linked, extended inactivity, or WhatsApp's own anti-automation detection). If this happens, delete the saved session folder and restart to get a fresh QR code.
A note on WhatsApp's policies
Unofficial libraries automate a personal WhatsApp account, which is outside WhatsApp's official Business API terms โ this is extremely common for small bots, but be aware heavy/spammy automated messaging is what actually gets numbers banned, not automation itself. Keep message volume reasonable and don't use it to send unsolicited bulk messages.
Related: Managing bot tokens and secrets safely (the same principles apply to any API keys your WhatsApp bot uses).
Was this not what you needed?
Tell us what you're trying to do and our team will help directly.
Open a support ticket Ask on Discord