WhatsApp Gateway
WhatsApp runs through Twilio. Carina mounts webhook routes on the same Express server as the web gateway.
Setup
-
Create a Twilio account and enable the WhatsApp sandbox (or an approved sender).
-
Set environment variables:
TWILIO_ACCOUNT_SID=AC...
TWILIO_AUTH_TOKEN=...
TWILIO_WHATSAPP_FROM=whatsapp:+14155238886 -
In the Twilio console, set the inbound webhook URL to:
https://your-domain/webhooks/whatsapp -
Ensure
WEB_ENABLEDis notfalseand port 443 reaches Carina (via nginx or similar).
Behaviour
- No streaming - The full reply is sent in one WhatsApp message when generation completes.
- Media - Images and PDFs from users are saved under
data/uploads/and paths are available to file tools in the same turn. - Commands -
/help,/provider,/clear, and/memoriesfollow the same routing as Telegram where implemented.
Security
- Use HTTPS only for webhooks.
- Twilio signs requests; keep
TWILIO_AUTH_TOKENsecret. - WhatsApp user content is scanned by Scout prompt guard when
LABYRINTH_ENABLED=true.
Troubleshooting
Startup logs WhatsApp gateway skipped when any of the three Twilio variables is missing. All three are required.