# "How to Connect Twilio Messaging Service to On-Chat"

> "On-Chat integrates with Twilio Messaging Service so your team can manage SMS at scale using Twilio's intelligent number pooling and routing capabilities."

URL: https://on-chat.live/guides/integrations/how-to-connect-twilio-messaging-service-to-on-chat/
Last updated: 2026-11-14

## What is Twilio Messaging Service?
Twilio Messaging Service is an advanced SMS solution that provides number pooling, sticky sender, geomatch, and smart encoding features for businesses sending SMS at scale. Unlike a single phone number, a Messaging Service automatically selects the best number for each message, improving deliverability and throughput.


## Prerequisites
- An active Twilio account with a Messaging Service created
- Twilio Account SID and Auth Token
- On-Chat account with admin access
- At least one SMS-capable phone number added to your Messaging Service
- Messaging Service SID (starts with MG)

## Step 1: Create a Twilio Messaging Service
In the Twilio Console, navigate to **Messaging** → **Services** and click **Create Messaging Service**. Give it a name and select **Mixed** as the use case. This creates a sender pool that On-Chat will use to send outbound SMS messages.

## Step 2: Add Phone Numbers to the Messaging Service
In your Messaging Service settings, go to **Sender Pool** and click **Add Senders**. Add your Twilio phone numbers to the pool. For high-volume SMS, Twilio will automatically distribute messages across all numbers in the pool.

## Step 3: Get Your Messaging Service SID
In the Twilio Console, go to your Messaging Service settings. Copy the **Messaging Service SID** (it starts with MG). You'll also need your Account SID and Auth Token from the main account settings page.

## Step 4: Configure Messaging Service in On-Chat
In On-Chat, go to **Settings** → **Inboxes** → **New Inbox** → **SMS** and select **Twilio**. Enter your Account SID, Auth Token, and use your Messaging Service SID instead of a single phone number. This enables pooled sending.

## Step 5: Set Up Inbound Webhook
In your Twilio Messaging Service settings, under **Integration**, set the **Incoming Messages** webhook URL to your On-Chat SMS webhook endpoint. All inbound replies will be routed through this webhook to your On-Chat inbox.

## Step 6: Test Messaging Service Integration
Send a test SMS from On-Chat to a mobile phone. Verify the message is sent from one of the numbers in your sender pool. Reply to that message and confirm it arrives in your On-Chat inbox. Check Twilio Console logs for delivery confirmation.

## Best Practices
- Add multiple phone numbers to the Messaging Service pool for redundancy and throughput
- Enable the Sticky Sender feature to ensure replies always come from the same number for each contact
- Monitor the Messaging Service's error logs in Twilio Console regularly
- Use Geomatch to automatically use a local number matching the recipient's area code

## Keep reading

- ["How to Connect an Android Phone to On-Chat"](https://on-chat.live/guides/integrations/how-to-connect-an-android-phone-to-on-chat/): "Connect an Android phone with a local SIM card to On-Chat to send and receive SMS for your contacts. One phone covers a country's message volume."
- ["How to Connect ArabiaCell SMS to On-Chat"](https://on-chat.live/guides/integrations/how-to-connect-arabiacell-sms-to-on-chat/): "Connect ArabiaCell SMS to On-Chat and manage SMS conversations from Gulf region customers in a shared team inbox."
- ["How to Set Up On-Chat Custom Voice Channel"](https://on-chat.live/guides/integrations/how-to-set-up-on-chat-custom-voice-channel/): "Set up On-Chat Custom Voice channel to handle inbound and outbound voice calls in your customer support inbox."
