Custom app, Twilio

Is it possible to send an SMS message using Twilio from a groovy-coded custom app?
And is there a maximum length?
An example would be nice.

Thanks in advance.

Could you please go into more detail on what you are trying to do? At a high level yes an App can easily send a SMS though the question comes into how you want to manage the phone number to send the message to. That is why most are creating virtual Twilio devices and have the app send a notification to that device. You could have an app input with phone numbers and send them to that list too. It will all be done via Restful Post message. Regarding length of message, that is defined on Twilio API documentation:

If the body of your message is more than 160 GSM-7 characters (or 70 UCS-2characters), Twilio will send the message as a segmented SMS and charge your account accordingly.

You can view code samples of the original Twilio driver I created before this was supported out of the box by HE:

This is done via driver but again you can take the web services calls and put them into an app.

My question was too vague indeed.
I just wanted to have an example of calling a "Twilio-virtual-device" from custom-groovy-code.

Thanks in advance

You just need an input to collect the notification devices:
input "notificationDevices", "capability.notification", title: "Use Notification Devices", required: false, multiple: true

Then when you want to send your notification use something like the following:
if (notificationDevices) {

1 Like