Release 7.2.0, Beta 1 - Support for Twilio Studio Flows

Posted on
Wed May 09, 2018 4:56 pm
FlyingDiver offline
Posts: 2188
Joined: Jun 07, 2014
Location: Cape Coral, FL

Release 7.2.0, Beta 1 - Support for Twilio Studio Flows

Now has a new action for initiating a Twilio Studio Flow via the REST API. Requires a Flow SID (from your Twilio Portal) and a destination phone number.

All the heavy lifting for using this is done in Twilio Studio. I'll be writing up an example that does the following:

1. Makes a voice call to a given phone number. Plays a message via TTS.

2. Waits for a DTMF tone (number input).

3. Makes an HTTPS request back to Indigo via my HTTPd plugin. The number entered on the phone is included in the HTTPS request, which is saved to a variable.

Indigo can trigger on changes to that variable to do whatever you want.

For security purposes, a random authentication code (16 digit alphanumeric) is generated by the plugin and sent as part of the request to Twilio. It's also stored in a state for the Twilio device.

The example Flow includes that auth code with the http request back to Indigo. The triggered Indigo script should compare the auth code in the httpd_ variable against the last_auth state in the device to verify that the request is legitimate. I have not yet implemented this in my testing.

You will need the current pre-release Twilio plugin: https://github.com/FlyingDiver/Indigo-T ... g/7.2.0-B1
And the pre-release HTTPd plugin: https://github.com/FlyingDiver/Indigo-H ... /tag/1.2.0

The HTTPd plugin was updated because Twilio does not send the Basic Authentication header unless it gets a 401 reply from an initial request without the header.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed May 09, 2018 5:10 pm
Colorado4Wheeler offline
User avatar
Posts: 2351
Joined: Jul 20, 2009
Location: Colorado

Re: Release 7.2.0, Beta 1 - Support for Twilio Studio Flows

That's super cool, I may have to install this plugin just to play with this!

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Wed May 09, 2018 7:31 pm
FlyingDiver offline
Posts: 2188
Joined: Jun 07, 2014
Location: Cape Coral, FL

Re: Release 7.2.0, Beta 1 - Support for Twilio Studio Flows

First cut at the instructions for setting this all up are at https://github.com/FlyingDiver/Indigo-T ... o-Flow-API

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests