Prerequisites
Twilio Account
An active Twilio account with billing enabled. Sign up at twilio.com if you don’t have one.
WhatsApp-Enabled Number
Either a Twilio production WhatsApp number (approved by Meta via Twilio) or access to the Twilio Sandbox for WhatsApp for testing.
Find Your Twilio Credentials
You’ll need two values from the Twilio Console: your Account SID and your Auth Token.1
Log in to Twilio Console
Go to console.twilio.com and sign in. Your Account SID and Auth Token are displayed on the main dashboard under Account Info.
2
Copy Account SID
Click the copy icon next to your Account SID. It starts with
AC followed by a 32-character string.3
Reveal and Copy Auth Token
Click the eye icon to reveal your Auth Token, then copy it. Keep this value private — it grants full access to your Twilio account.
Enter Credentials in Soneka
1
Open Integrations
In Soneka, go to Settings → Integrations → Twilio and click Connect.
2
Paste Your Credentials
Enter your Account SID and Auth Token into the respective fields.
3
Select Sandbox or Production
Choose your connection mode (see below). Then click Save & Connect. Soneka will verify the credentials with Twilio’s API before activating.
Sandbox vs. Production
- Sandbox (Testing)
- Production
The Twilio Sandbox lets you test WhatsApp messaging without a Meta-approved number. Recipients must first opt in by sending a specific join code to the Twilio Sandbox number.To use Sandbox mode:
- Select Sandbox when entering credentials in Soneka.
- Share the sandbox join instructions with your test contacts (found in Twilio Console → Messaging → Try it out → Send a WhatsApp message).
- Messages sent and received will appear in the Soneka inbox under the Sandbox channel.
Sandbox numbers cannot send template (HSM) messages. Use Sandbox only for development and functional testing.
Switching Between Sandbox and Production
To switch modes after initial setup, go to Settings → Integrations → Twilio → Edit Connection, change the mode, and click Save. Soneka will re-verify the credentials and update the Twilio webhook configuration automatically. Existing conversation history is preserved.Limitations vs. WhatsApp Cloud API
While Twilio is a solid choice if you’re already invested in its ecosystem, there are some differences to keep in mind:Troubleshooting
'Authentication failed' when saving credentials
'Authentication failed' when saving credentials
Double-check that you copied the Account SID and Auth Token exactly, with no leading or trailing spaces. Also confirm you’re using your primary account credentials, not a sub-account.
Messages sent from Soneka aren't delivered
Messages sent from Soneka aren't delivered
Verify that the phone number entered in Soneka exactly matches the WhatsApp-enabled number in your Twilio account (in E.164 format). Also check Twilio’s error logs in Console → Monitor → Logs → Errors for delivery failure codes.
Incoming messages not appearing in Soneka inbox
Incoming messages not appearing in Soneka inbox
Soneka automatically configures your Twilio webhook on connect. If inbound messages aren’t appearing, go to Twilio Console → Messaging → Senders → WhatsApp Senders, select your number, and confirm the Webhook URL matches the one shown in Soneka → Settings → Integrations → Twilio → Webhook Info.
Sandbox opt-in message not working
Sandbox opt-in message not working
Each test contact must send the exact join keyword to the Twilio Sandbox number before they can receive messages. The keyword is shown in Twilio Console. If they’ve already joined previously, their opt-in may have expired — have them re-send the join message.