- Why does Twilio sponsor hackathons
- TODO before the hackathon
- TODO after the hackathon
- Quick-and-easy code snippets
- Tutorials
- Some cool hacks we've seen from hackathons
- Tips
- To inspire and equip developers, mentoring and teaching you about Twilio as well as general programming topics unrelated to Twilio products!
- To create evangelists, champions out of developers by getting you excited to use Twilio!
- Receive product feedback and see different use cases. Be creative! :D
- Yes, to generate more sign-ups. We are a public company after all!
- Yes, it does look good in a Twilio interview to "eat the API dog food" and have experience using Twilio products--so use Twilio in your hacks and you can talk about it in interviews. Some former "Best use of Twilio" hackathon winners went on to intern here! Check out our job listings
We recommend playing through TwilioQuest, a video game that makes it fun to learn how to use different Twilio products. There's also lots of tutorials and documentation you can read through (see below.)
Make sure to put your hack on GitHub (public) for the world to see and submit to DevPost! This will come in handy for interviews and more. Go back and clean up the code, make a good README, and continue iterating over your hack if you are passionate about it and want to add on different features. The sky is the limit!
- Make a Twilio account (it's free!)
- Apply promo code
- Buy a Twilio phone number
- Configure your Twilio phone number for when a SMS or phone call comes in with a TwiML Bin, Twilio Function, or ngrok URL.
Did you miss the Twilio demo during the hackathon Opening Ceremony? It probably contained code like this:
var express = require('express');
var bodyParser = require('body-parser');
var dotenv = require('dotenv');
dotenv.load();
var app = express();
app.use(bodyParser.urlencoded({extended: false}));
app.post('/hack', (req, res) => {
var inbMsg = req.body.Body.toLowerCase().trim();
if(inbMsg == "matcha") {
res.send("<Response><Message>Responding to matcha</Message></Response>");
}
res.send("<Response><Message>Else respond with this</Message></Response>");
});
app.listen(1337, () => {
console.log("Express server listening on port 1337");
});
var express = require('express');
var bodyParser = require('body-parser');
var dotenv = require('dotenv');
dotenv.load();
var fromNum = "your-twilio-number";
var app = express();
app.use(bodyParser.urlencoded({extended: false}));
const client = require('twilio')('YOUR-ACCOUNT-SID', 'YOUR-AUTH-TOKEN');
const filter = {
to: fromNum // switch this out with your "from" number
}
client.messages.each(filter, (message) => client.calls.create({
url: 'https://desolate-shelf-95000.herokuapp.com/redirect', // switch this for the mp3 of your choice
to: message.from,
from: fromNum // again, switch out for your "from" number
}).then(call => console.log(call.sid)));
Node.js code in a Twilio Function
exports.handler = function(context, event, callback) {
let twiml = new Twilio.twiml.MessagingResponse();
if(event.Body.toLowerCase().trim() == "matcha") {
twiml.message("You right. @lizziepika, [email protected], promo: HACKUCI2020, https://twil.io/hackathons");
}
else {
twiml.message("No. @lizziepika, [email protected], promo: HACKUCI2020, https://twil.io/hackathons");
}
callback(null, twiml);
};
from twilio.twiml.messaging_response import MessagingResponse
from flask import Flask, request
app = Flask(__name__)
@app.route('/sms', methods=['GET', 'POST'])
def sms():
msg = request.values.get('Body').lower().strip()
res = MessagingResponse()
if msg == "matcha":
res.message("noice")
else:
res.message("meh")
return str(res)
if __name__ == "__main__":
app.run(debug=True)
from twilio.rest import Client
client = Client('YOUR-TWILIO-ACCOUNT-SID', 'YOUR-TWILIO-AUTH-TOKEN')
for num in client.messages.list(to='YOUR-TWILIO-NUMBER'):
call = client.calls.create(
url = 'http://demo.twilio.com/docs/classic.mp3',
to = num.from_,
from_ = 'YOUR-TWILIO-NUMBER'
)
print(call.sid)
- Android quickstart
- Twilio Java library
- Java SMS quickstart
- send SMS, MMS in Java
- receive, reply to SMS, MMS in Java
- voice quickstart in Java
- respond to incoming phone calls in Java
- modify in-progress calls in Java
- make outbound calls in Java
- Chat tutorial for Android and Java
- Twilio Video quickstart for Android
- Build an IVR with Twilio Studio
- Make + receive phone calls in Node.js
- Send + receive SMS in Node.js
- Send + receive SMS in Python
- Make + receive phone calls in Python
- Send + reply to SMS in Java 8 and Spark
- Send email with Java and SendGrid
- Send email with Python and SendGrid
- Send a WhatsApp Message in Python
- Send a WhatsApp message in Node.js
- Send an SMS in Kotlin
- Image recognition in Python with Clarifai and Twilio MMS
- Basics of making + receiving phone calls
- Basics of sending + receiving text messages
- Send and reply to text messages in Java
- Build SMS surveys in Twilio Studio
- Build call forwarding apps with Twilio Studio
- How to post messages to Slack with Twilio Studio
We've been to a lot of hackathons, both as hackers and sponsors. What advice do we have for you as hackers?
- Have fun! Hackathons can be intense and a lot to handle. Don't forget to build something you want to build.
- Take risks! Learn something new. Try building something in a new language. You're surrounded by passionate people who are giving up their weekends to build something or help you. Take advantage of them! Ask questions about what classes they're taking if they're a fellow hacker, or talk to a mentor/sponsor about their jobs and their backgrounds.
- Go to workshops and activities. Yes, you're probably here to hack, but you can't be productive for the whole time. Don't forget to take breaks, talk to people, and take advantage of what the organizers have put together for you.
- Demo. Even if your hack isn't perfect, it's a hack. You had a weekend to build something and hopefully you did other things, too (maybe cup-stacking?) Prepare a demo and give it! It's fun and important to be able to explain what you did and to show others.
- On the topic of demos, keep it short and simple. Yes, it's nice to have a lead-in showing you did background research, but the focus should be on showing what you built. That is the primary focus of judges: most everything else is probably secondary.