# Twilio international compatibility

**URL:** <https://forum.inductiveautomation.com/t/twilio-international-compatibility/15501>\
**Category:** Ignition\
**Created:** [September 28, 2017, 8:22pm UTC](https://forum.inductiveautomation.com/t/twilio-international-compatibility/15501 "2017-09-28T20:22:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josdn](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/josdn/32/84081_2.png) [@Josdn](https://forum.inductiveautomation.com/u/Josdn)\
**Post date:** [September 28, 2017, 8:22pm UTC](https://forum.inductiveautomation.com/t/twilio-international-compatibility/15501/1 "2017-09-28T20:22:16Z")

</div>

Hi,  
Does the Twilio module support international numbers? I’m trying to send an SMS from another country but the gateway log says that the format of the phone number is not correct. I’ve checked the number and everything seems to be fine. I’m trying to send a message to Costa Rica so the number format I’m using is +506 1234 5678

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 28, 2017, 9:42pm UTC](https://forum.inductiveautomation.com/t/twilio-international-compatibility/15501/2 "2017-09-28T21:42:51Z")

</div>

It should work, but I’m not sure what the number format is supposed to be. It may depend on the country you’re sending _from_ as well.

Have you tried prepending 011 to the number yet? 011 506 1234 5678

---

<div class="post-metadata">

**Author:** ![Josdn](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/josdn/32/84081_2.png) [@Josdn](https://forum.inductiveautomation.com/u/Josdn)\
**Post date:** [September 28, 2017, 10:13pm UTC](https://forum.inductiveautomation.com/t/twilio-international-compatibility/15501/3 "2017-09-28T22:13:13Z")

</div>

I tried prepending 011 to the number as you said but it didn’t work.  
I’m using a “ **+1 409** 123 4567” number (USA) to send the SMS to a “ **+506** 1234 5678” number (CR). I’m using an USA number because the trial account in Twilio doesn’t let me choose one from Costa Rica. But I tested the communication in the Twilio API and it works.

---

<div class="post-metadata">

**Author:** ![ncj](https://avatars.discourse-cdn.com/v4/letter/n/c68b51/32.png) [@ncj](https://forum.inductiveautomation.com/u/ncj)\
**Post date:** [March 10, 2020, 2:51pm UTC](https://forum.inductiveautomation.com/t/twilio-international-compatibility/15501/4 "2020-03-10T14:51:16Z")

</div>

Hi  
Did you manage to get this to work? I am currently trying to send to a Danish number but receives the message:

```auto
Caused by: java.util.concurrent.ExecutionException: com.digitalpetri.ignition.twilio.accounts.TwilioAccount$TwilioAccountException: To number: +45XXXXXXXX, is not a mobile number

```

Gateway error like this:

```auto
com.twilio.exception.ApiException: The 'To' number 0045XXXXXXXX, is not a valid phone number.
at com.twilio.rest.api.v2010.account.MessageCreator.create(MessageCreator.java:505)
at com.twilio.rest.api.v2010.account.MessageCreator.create(MessageCreator.java:25)
at com.twilio.base.Creator.create(Creator.java:45)
at om.digitalpetri.ignition.twilio.accounts.TwilioAccount$ConnectedTwilioAccount.lambda$sendSms$6(TwilioAccount.java:344)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)

```

DK numbers are structured with 8 digits. And international code is +45.

Testing with the code example number I reach the Twilio service and a successful send.  
[https://docs.inductiveautomation.com/display/DOC79/system.twilio.sendSms](https://docs.inductiveautomation.com/display/DOC79/system.twilio.sendSms)

Regards Niels

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 10, 2020, 2:53pm UTC](https://forum.inductiveautomation.com/t/twilio-international-compatibility/15501/5 "2020-03-10T14:53:37Z")

</div>

It seems Twilio does not support two-way SMS in Denmark: [https://www.twilio.com/guidelines/dk/sms](https://www.twilio.com/guidelines/dk/sms)

edit: however I don’t know if this means you shouldn’t be able to send an SMS not expecting to interact or receive a reply…

---

<div class="post-metadata">

**Author:** ![ncj](https://avatars.discourse-cdn.com/v4/letter/n/c68b51/32.png) [@ncj](https://forum.inductiveautomation.com/u/ncj)\
**Post date:** [March 12, 2020, 8:17am UTC](https://forum.inductiveautomation.com/t/twilio-international-compatibility/15501/6 "2020-03-12T08:17:56Z")

</div>

My fault.

Since the birth of Twilio they have some more stronger dependencies on which twilio number is sending to which country. Meaning that sending to Danish numbers you need to have a danish twilio number.

With that set up it works very fine:)
