Contact Us
WhatsApp (Twilio) Integration

How to Connect WhatsApp to NIVA via Twilio — Integration Guide

15–20 minutes Medium 6 steps

Connect NIVA to WhatsApp via Twilio so your AI bot responds to WhatsApp messages. Start with the free sandbox for instant testing, then apply for a production WhatsApp Business number when ready.

Before you begin
NIVA botmaster account with a bot configured
Twilio account (free tier works for sandbox testing)
Step-by-step setup

Create a Twilio Account

  • Go to https://www.twilio.com and sign up
  • Verify your email and phone number
  • From the dashboard, note your Account SID and Auth Token

Activate the WhatsApp Sandbox

  • In Twilio Console → MessagingTry it outSend a WhatsApp message
  • Note the sandbox number and join code shown
  • Open WhatsApp on your phone and message the sandbox number: join <your-join-code>
  • You will receive a confirmation reply — sandbox is now active
Each tester must join the sandbox individually using the join code.

Configure in NIVA Botmaster

  • Open your NIVA botmaster → Omnichannel
  • Click Configure on the WhatsApp (Twilio) card
  • Paste Account SID and Auth Token
  • Enter the Twilio WhatsApp number with prefix: whatsapp:+14155238886
  • Click Save & Activate
  • Copy the Webhook URL

Set Webhook in Twilio

  • Twilio Console → MessagingTry it outSend a WhatsApp message
  • Scroll to Sandbox settings
  • Paste your NIVA Webhook URL into "When a message comes in"
  • Set method to HTTP POST
  • Click Save

Test the Integration

  • Send any WhatsApp message to the sandbox number
  • The bot should reply within 2–3 seconds

Go Production (Optional)

  • Twilio Console → MessagingSendersWhatsApp SendersRequest Access
  • Connect your Meta Business account and submit your phone number for approval
  • Once approved, update the number in NIVA botmaster config
Meta approval can take 1–7 business days.
Troubleshooting
No reply at all
Check webhook URL is saved in Twilio sandbox settings.
403 in logs
Auth Token wrong — re-copy from Twilio dashboard.
Signature fails on ngrok
ngrok URL changes each restart — update Twilio webhook URL.
"This number is not in sandbox"
Phone did not join — send the join code again.
Ready to connect WhatsApp (Twilio)?
Open your NIVA botmaster → Omnichannel → Configure
Open Omnichannel