# Do I need a Twilio Account to use the Twilio Module?

**URL:** <https://forum.inductiveautomation.com/t/do-i-need-a-twilio-account-to-use-the-twilio-module/89444>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 25, 2024, 12:38pm UTC](https://forum.inductiveautomation.com/t/do-i-need-a-twilio-account-to-use-the-twilio-module/89444 "2024-04-25T12:38:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miguel\_Villasenor\_Es](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/miguel_villasenor_es/32/60416_2.png) [@Miguel\_Villasenor\_Es](https://forum.inductiveautomation.com/u/Miguel_Villasenor_Es)\
**Post date:** [April 25, 2024, 12:38pm UTC](https://forum.inductiveautomation.com/t/do-i-need-a-twilio-account-to-use-the-twilio-module/89444/1 "2024-04-25T12:38:55Z")

</div>

Hello Everyone.

Hopefully this is an easy thread.  
I set up the twilio account on our ignition gateway.  
I also set up an alarm notification profile.

 ![2](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/a/7ab95a1ac260df8769d4b3347ddd4aed0c35b8d7.png)  
 ![1](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/7/b7af338f165140ff8816cf3555705f8c3cf79d39.png)  
 ![3](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/c/dc960d706f33ec7aacbc678919ceb02fe820e630.png)

Here is what my script looks like:

```python
	
	account = system.twilio.getAccounts()
	 
	fromNumber = system.twilio.getPhoneNumbers(str(account))[0]
	system.perspective.print(fromNumber)
	 
	toNumber = "+1mynumber"
	 
	
	textMessage = "This is the body of a text message"
    system.twilio.sendSms(account, fromNumber, toNumber, textMessage)

```

I also added this script to see:

```python
for number in twilioNumbers:

    system.perspective.print(number)|

```

And I get an error that states: **java.lang.Exception: java.lang.Exception: no account '[MES Twilio]' found**

Do I need to sign up for a twilio account?

---

<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:** [April 25, 2024, 12:52pm UTC](https://forum.inductiveautomation.com/t/do-i-need-a-twilio-account-to-use-the-twilio-module/89444/2 "2024-04-25T12:52:21Z")

</div>

> [@Miguel\_Villasenor\_Es](#):
>
> `	account = system.twilio.getAccounts()`

This returns a list, not a single account name.

---

<div class="post-metadata">

**Author:** ![Miguel\_Villasenor\_Es](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/miguel_villasenor_es/32/60416_2.png) [@Miguel\_Villasenor\_Es](https://forum.inductiveautomation.com/u/Miguel_Villasenor_Es)\
**Post date:** [April 25, 2024, 1:33pm UTC](https://forum.inductiveautomation.com/t/do-i-need-a-twilio-account-to-use-the-twilio-module/89444/4 "2024-04-25T13:33:35Z")

</div>

Here is some code for trouble shooting:

```python
	account = system.twilio.getAccounts()[0]
	system.perspective.print(account)
	
	someNum = system.twilio.getPhoneNumbers(account)
	system.perspective.print(someNum)
 

```

The results are as followed:

- MES Twilio
- []  
I get an empty dataset? Am I supposed to configure a set of numbers somewhere?

---

<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:** [April 25, 2024, 1:34pm UTC](https://forum.inductiveautomation.com/t/do-i-need-a-twilio-account-to-use-the-twilio-module/89444/5 "2024-04-25T13:34:53Z")

</div>

> [@Miguel\_Villasenor\_Es](#):
>
> Am I supposed to configure a set of numbers somewhere?

In your Twilio dashboard/account (on the Twilio website) you must purchase at least one phone number and associate it with this account.

---

<div class="post-metadata">

**Author:** ![Miguel\_Villasenor\_Es](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/miguel_villasenor_es/32/60416_2.png) [@Miguel\_Villasenor\_Es](https://forum.inductiveautomation.com/u/Miguel_Villasenor_Es)\
**Post date:** [April 25, 2024, 2:22pm UTC](https://forum.inductiveautomation.com/t/do-i-need-a-twilio-account-to-use-the-twilio-module/89444/6 "2024-04-25T14:22:18Z")

</div>

I used whatsapp instead of using a twilio number. It worked greate! 😃  
If anyone is intrested LMK.
