Mautic Community Forums

Texting With Twilio

The instructions seem way too easy to send text messages, lol. So I have a paid Twilio account, a phone number, etc and can not get it to send a text from the system. The campaign is set up, phone number is in cust file to test, campaign reports that it is triggered, but not working.



Is there a link to some troubleshooting for it?

The instructions seem way too easy to send text messages, lol. So I have a paid Twilio account, a phone number, etc and can not get it to send a text from the system. The campaign is set up, phone number is in cust file to test, campaign reports that it is triggered, but not working.

Is there a link to some troubleshooting for it?

I’m having the exact same issue. To my understanding everything has been setup correctly.

  • Twilio credit purchased.

  • Configuration - Text Message Setting
    Text message Enabled switch: ENABLED
    Text Message Provider Username: Filled, cut’n’paste from Twilio
    Text Message Provider Password: Filled, cut’n’paste from Twilio
    Sending Phone Number: Filled, cut’n’paste from Twilio

  • Channels - Text message
    Test message made

  • Campaign, Segment
    Test campaign that send SMS to contacts added to segment

  • Contacts
    Contacts added
    Contacts added to segment

But no messages are being sent even if on the contact page the action has been performed.

On the text message page the test message reads: “Stats: 0 Sent”.

Can anyone help with this issue? Were you Lewisone able to resolve the problem?

Does Mautic gather error logs somewhere?

To see logs go to Settings -> System Info -> log

The contact number must be E.164 number formatting.

For example, to convert a US phone number like 415 555 2671 to E.164 format, you need to add the ‘+’ prefix and the country code (which is 1) in front of the number so it will look like +14155552671.

Isoldado thanks for your reply!

At last I was able to get Mautic working with Twilio. It was actually a combination of things that were not setup correctly:

Make sure that:

  • The Twilio SMS-gateway number is entered in this format: +3584573963085

  • The number of the contact must be saved in the MOBILE field (not phone)

  • The users number must be saved in +358405392210 format

I have to find a way to either change the format entered (most people enter the numbers without the prefix) or make an validation for the field. Shame that there is not a validation I could add easily through Mautic.

Thanks for your responses about Twilio, I want to add a correction, this is how it worked in my case:

When you provide the account Twilio Phone in the “Sending Phone Number” field in Mautic, the format doesn’t need to be in E.164, enter the number in area-code and number format as in 5553331212 without the +1 (this may be specific for US usage). If you supply +1 in front the error is:
+1553331212 is not a valid, SMS-capable inbound phone number or short code for your account.

The mobile phone you’re texting to must have the E.164 format with the +1 in front as in +16154441212 for US.

If you’re using a trial account for Twilio, you have to verify the phone you’re sending-to first, other numbers are not allowed on trial accounts.

Thanks for the paper trail here so that I could troubleshoot this same exact thing. Any reason why these formats aren’t properly enforced in the app, since they are so critical to this functionality actually working?!