Wow! Build your WhatsApp integration. Start free. Register Now
Clone-first guide for developers

Creating a WhatsApp Bot with Node.js

Updated on Sep. 16, 2026

Start with a ready-made Node.js bot from GitHub. With Whapi.Cloud you connect a regular WhatsApp number by QR, put a public HTTPS URL in config.js, and run node index.js. The bot registers the webhook itself. No Meta approval, no Cloud API restrictions, and the phone does not need to stay online.

This guide is your template for the Whapi.Cloud WhatsApp API. The cloned Node.js bot already works with groups — and once it is running, you can plug in any API method: media, catalogs, polls, statuses, number checks, CRM hooks. Same token, same HTTP pattern.

Creating a WhatsApp Bot with Node.js: A Step-by-Step Guide

Frequently asked questions

No. Put it in config.js as botUrl (ending in /hook). On start the bot registers it with PATCH /settings.
Whapi.Cloud only POSTs to HTTPS URLs on the public internet. Use ngrok or deploy; http://localhost will not receive webhooks.
That is expected. The repository ignores from_me so it cannot loop on its own messages.
Paste real IDs into config.product and config.group. Text, image, document, video and contact (1–5) work without those fields.
Yes. The cloned repo already includes group commands, and this guide shows how to list groups, read participants, and send into a group. The same HTTP pattern works for other group methods in the Whapi.Cloud API.
Yes. Media, catalogs, polls, statuses, and number checks use the same token and HTTPS call pattern as the send and groups examples. Treat this article as the integration template, then pick the method from the API docs.
Everything you need for WhatsApp automation in one place

Are you using WhatsApp to interact with your customers?

We help programmers and small businesses automate any WhatsApp function and set it up to run on autopilot with chatbots, group management, bulk messages, polls, goods, orders and more!