WhatsApp Channel
The WhatsApp channel allows your agents to communicate with customers directly via WhatsApp. This integration is powered by Twilio’s WhatsApp Business API.
Prerequisites
Before configuring the WhatsApp channel, ensure you have the following:
- Twilio Account: You need an active Twilio account. Sign up here .
- WhatsApp Business Account: A Meta Business Manager account with a verified WhatsApp Business profile.
- Twilio WhatsApp Sender: A phone number enabled for WhatsApp in your Twilio console.
Configuration
To connect your WhatsApp number, you will need to gather your credentials from the Twilio Console and configure them in your project.
Step 1: Get Twilio Credentials
- Log in to your Twilio Console .
- Navigate to the Account Info section on the dashboard.
- Copy the following values:
- Account SID
- Auth Token
Step 2: Get WhatsApp Number
- In the Twilio Console, go to Messaging > Senders > WhatsApp Senders.
- Copy the Phone Number that is approved for WhatsApp (e.g.,
+1234567890).
Step 3: Configure in Uncodie
You can configure the channel using the API endpoint below.
Endpoint
POST /api/agents/tools/configureWhatsApp
Request Body
{
"site_id": "your-site-uuid",
"action": "set_credentials",
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"access_token": "your_auth_token_here",
"from_number": "+1234567890"
}site_id: The UUID of your site.action: Must be set to"set_credentials".account_sid: Your Twilio Account SID.access_token: Your Twilio Auth Token.from_number: Your WhatsApp Business phone number.
Webhooks
To receive messages, you must configure the webhook URL in Twilio:
- Go to Messaging > Senders > WhatsApp Senders.
- Select your number.
- Under Endpoint Configuration, set the “Webhook URL for Incoming Messages” to:
https://your-api-domain.com/api/integrations/twilio/whatsapp
Last updated on