Mautic Integration with Twilio to send message to Whatsapp

hi jpgiron

The Twilio integration with Mautic works only for SMS. if you want to send whatsapp messages through mautic to Twilio you need a different approach. You should use a webhook action in a campaign that send the the payload to a Twilio endpoint that is intended to handle messages for WhatsApp

the paramters are as follows:

Twilio endpoint for whatsapp messaging:
https://api.twilio.com/2010-04-01/Accounts/xxxxxxxxxxxxxxx/Messages.json

(xxxxxxxxxxxxxxx is your Twilio client id - same one you use in Mautic)
Method is POST
Headers:
autorization: basic twilioclientid:twilioclientsecret (twilio credentials (along with “:”) should be encoded in base64. you can do it here https://www.base64encode.org)
content-type: application/x-www-form-urlencoded

Data
From: your number (whatsapp+number)
To: number of recepient
Body: content of message

all Data fields support mautic tokens for fields (as you can see from screenshot)

5 Likes