Twilio Python Programming

Whilst coding in Cambridge with the Raspberry Pi Foundation for the YRS Festival of Code, I was lucky enough to be able to glean some knowledge from Paul Hallet, who introduced me to Flask & Twilio:

We take care of the messy telecom hardware and expose a globally available cloud API that developers can interact with to build intelligent and complex communications systems. As your app’s usage scales up or down, Twilio automatically scales with you. You only pay for what you use – no contracts, no shenanigans.

from Twilio.com
My team didn’t actually use Twilio in the project, however, it did stick in my mind…

Bit bored yesterday evening, was trying to think of something to do and Twilio popped back up into my mind. 10 minutes later, I was texting my mum’s phone (I don’t have one besides Twilio ;P) from a Python script.
One thing you have to remember is to set up a web hook for your Twilio number. Just go to your numbers, click on the one you’re using and then where it says ‘Request URL’ under ‘Call’ and ‘Text’, put http://yourserver.com:5000/call and http://yourserver.com:5000/text in the relevant boxes. You should be good to go!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s