Built My First (Twilio) SMS App! 👨‍💻☎️

Jesse Sumrak
Becoming a Developer
2 min readFeb 25, 2019

The Udacity course has been going fantastic, so far. Cruised through the short HTML and CSS courses, and now I’ve been in the weed with Python for quite a bit now. I haven’t necessarily learned anything new or different from my Udemy course, but I’m still in the beginning stages. I have grasped the concepts of what I’m doing 100% better, though. I have the know-how to create dice rolling games, heads-tails games, and whatnot with no previous code, so I’m understanding the thought process more.

Most recently, I built my first Python app that is integrated with my Twilio phone number and uses Strava APIs…so that’s pretty exciting. The Twilio Developer team held a bootcamp for us new Twilio SendGrid employees and showed us the basics of inbound and outbound SMS with the Twilio platform, then helped us as we set out to make our own apps.

Mine is pretty simple— you text 1(720–378–4272) with “run”, “bike”, or “swim,” and you receive my lifetime total mileage for any of those activities. I want to make it a bit more robust and allow users to input their own Strava IDs to receive their personal stats, but that requires some more sophisticated code with logins and authorizations and what not and I’m not quite there yet. Maybe with a bit more work in my intro class I’ll learn what I need to to make it happen. But, regardless, my app passed the test and earned me the coveted red track jacket, so I’m super proud of that. Simple…but I’m getting somewhere.

But to build the Python app, it was pretty easy. We imported in a few different modules, then we immediately set about defining a function that made up the bulk of the code. The function requested data from a specific URL and then received some headers in order to accept/authorize “getting” the data from that page. Then, it was simple using some if/elif/else statements to define what would happen when users texted in different statements. After that, we turned the JSON data into Python data, then converted the pulled stats from meters into mileage, then used some TWIML to define what the text would return…and that’s it! My first app 😃 so excited!

--

--

Jesse Sumrak
Becoming a Developer

Jesse Sumrak is a writing zealot focused on creating killer content. He’s spent almost a decade writing about startup, marketing, and entrepreneurship topics.