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

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.



Here is what my script looks like:

	
	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:

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?

This returns a list, not a single account name.

Here is some code for trouble shooting:

	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?

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

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