All integrations

WhatsApp (Twilio) Integration

How to Connect WhatsApp to NIVA via Twilio · Integration Guide

15–20 minutesMedium6 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

  1. 1

    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
  2. 2

    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.
  3. 3

    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
  4. 4

    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
  5. 5

    Test the Integration

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

    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.