Back to docs
WhatsApp bot starter (Twilio)
Deploy a production-ready WhatsApp bot in minutes using Twilio's Messaging API. Auto-reply, webhook handling, and sandbox testing included.
Prerequisites
- A Twilio account with an active phone number
- Node.js 18+ and npm installed
- ngrok or similar tunnel for local webhook testing
Quick start
npx create-meridian-app@latest my-whatsapp-bot --template whatsapp-twilio
cd my-whatsapp-bot
npm install
cp .env.example .env
# Fill in TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, TWILIO_PHONE_NUMBER
npm run devWebhook setup
- Start ngrok:
ngrok http 3000 - Copy the HTTPS forwarding URL
- In Twilio Console, set the WhatsApp sandbox webhook to
https://your-ngrok.ngrok.io/api/webhook - Send a message to your Twilio sandbox number to test
What's included
Auto-reply engine
Keyword matching and fallback responses out of the box.
Webhook validation
Twilio signature verification for every incoming request.
Environment config
All secrets managed via .env, never committed.
Deploy ready
One-click deploy to Vercel or Railway with zero config changes.