Menu

Expand
Rate this page:

Using Proxy with Channels

Proxy is able to bridge communications with more than just phone numbers. Channels can also be leveraged to reach more customers via messaging apps like WhatsApp and Facebook Messenger.

Let's say you are building a ride sharing application and you want to connect riders to customers. Some of the riders may prefer to use a messaging application over SMS. In order to do this we will need to set up one or more channels for use with Proxy.

Step 1: Install the channel

The first step is to install the channel in the console. Follow the documentation for the channel that you have selected (e.g. WhatsApp, Facebook Messenger). Make sure to click “Use in Programmable SMS Inbound”.

Twilio Console - Channels - Use In SMS

Step 2: Configure your Proxy service

The next step is to set up a Proxy Service (if you don’t already have one configured). Make sure to copy down the service SID (it will start with "KS" followed by 32 hexadecimal digits). You will also need the Account SID for your Twilio account, which you can find on your Console dashboard. After that is complete return to the channel configuration page and set the “Callback Url” to your proxy service:

Example: https://webhooks.twilio.com/v1/Accounts/ACXXXXXXXXXXXXXXXX/Proxy/KSXXXXXXXXXXXXX/Webhooks/Message

Twilio Console - Channels - Callback URL

To connect your rider with their driver you will follow all the same steps that you normally would using Proxy. The only difference will be that instead of using the rider's phone number as the “identifier” you will use the rider's message application id (e.g. messenger:+1415XXXXXXX) and specify your "from" channel identifier (e.g. your Facebook Messenger page ID, messenger:{page-id}) as the proxy identifier.

Now when the rider contacts your channel (e.g. Facebook Messenger page ID), their message will get forwarded directly to the driver and the driver will be able to message back to the customer’s messaging application.

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Community Forums or browsing the Twilio tag on Stack Overflow.

        
        
        

        Thank you for your feedback!

        We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!

        Refer us and get $10 in 3 simple steps!

        Step 1

        Get link

        Get a free personal referral link here

        Step 2

        Give $10

        Your user signs up and upgrade using link

        Step 3

        Get $10

        1,250 free SMSes
        OR 1,000 free voice mins
        OR 12,000 chats
        OR more