51
Rescue Me! Make your escape with Twilio

Rescue Me - Getting out of Meetings Using Twilio

Embed Size (px)

DESCRIPTION

Twilio is a cloud service for sending and receiving SMS, MMS and voice calls within your application. In this presentation I walked through building a simple service that would help you get out of meetings by sending a "rescue" text message at the right time.

Citation preview

Page 1: Rescue Me - Getting out of Meetings Using Twilio

Rescue Me!Make your escape with Twilio

Page 2: Rescue Me - Getting out of Meetings Using Twilio

Robert Horvick

Page 3: Rescue Me - Getting out of Meetings Using Twilio

@bubbafat

Page 4: Rescue Me - Getting out of Meetings Using Twilio

Custom .NET Development and Training

Page 5: Rescue Me - Getting out of Meetings Using Twilio

How to get out of meetings

Page 6: Rescue Me - Getting out of Meetings Using Twilio
Page 7: Rescue Me - Getting out of Meetings Using Twilio
Page 8: Rescue Me - Getting out of Meetings Using Twilio
Page 9: Rescue Me - Getting out of Meetings Using Twilio
Page 10: Rescue Me - Getting out of Meetings Using Twilio
Page 11: Rescue Me - Getting out of Meetings Using Twilio

Escape

Page 12: Rescue Me - Getting out of Meetings Using Twilio
Page 13: Rescue Me - Getting out of Meetings Using Twilio
Page 14: Rescue Me - Getting out of Meetings Using Twilio
Page 15: Rescue Me - Getting out of Meetings Using Twilio
Page 16: Rescue Me - Getting out of Meetings Using Twilio

Freedom!

Page 17: Rescue Me - Getting out of Meetings Using Twilio

How wouldwe do that?

Page 18: Rescue Me - Getting out of Meetings Using Twilio
Page 19: Rescue Me - Getting out of Meetings Using Twilio

SMS

MMS

Voice

Page 20: Rescue Me - Getting out of Meetings Using Twilio

Enough TalkLet’s build something

Page 21: Rescue Me - Getting out of Meetings Using Twilio

public class EchoController : TwilioController{    [HttpPost]    public ActionResult Index(SmsRequest message)    {        TwilioResponse response = new TwilioResponse();        response.Message(message.Body);        return TwiML(response);    }} 

Page 22: Rescue Me - Getting out of Meetings Using Twilio

public class EchoController : TwilioController{    [HttpPost]    public ActionResult Index(SmsRequest message)    {        TwilioResponse response = new TwilioResponse();        response.Message(message.Body);        return TwiML(response);    }} 

Page 23: Rescue Me - Getting out of Meetings Using Twilio

public class EchoController : TwilioController{    [HttpPost]    public ActionResult Index(SmsRequest message)    {        TwilioResponse response = new TwilioResponse();        response.Message(message.Body);        return TwiML(response);    }} 

Page 24: Rescue Me - Getting out of Meetings Using Twilio

public class EchoController : TwilioController{    [HttpPost]    public ActionResult Index(SmsRequest message)    {        TwilioResponse response = new TwilioResponse();        response.Message(message.Body);        return TwiML(response);    }} 

Page 25: Rescue Me - Getting out of Meetings Using Twilio

public class EchoController : TwilioController{    [HttpPost]    public ActionResult Index(SmsRequest message)    {        TwilioResponse response = new TwilioResponse();        response.Message(message.Body);        return TwiML(response);    }} 

Page 26: Rescue Me - Getting out of Meetings Using Twilio

public class EchoController : TwilioController{    [HttpPost]    public ActionResult Index(SmsRequest message)    {        TwilioResponse response = new TwilioResponse();        response.Message(message.Body);        return TwiML(response);    }} 

Page 27: Rescue Me - Getting out of Meetings Using Twilio

TwiML?

Page 28: Rescue Me - Getting out of Meetings Using Twilio

<?xml version="1.0" encoding="utf-8"?><Response> <Message>The SMS Message!</Message></Response>

Page 29: Rescue Me - Getting out of Meetings Using Twilio

MVC

SMS POST

TwiMLSMS

Page 30: Rescue Me - Getting out of Meetings Using Twilio

MVC

SMS POST

TwiMLSMS

Page 31: Rescue Me - Getting out of Meetings Using Twilio

Try It!

Page 32: Rescue Me - Getting out of Meetings Using Twilio

Security?

Page 33: Rescue Me - Getting out of Meetings Using Twilio

Things We Know…

URL Path and Query String

POST Parameters

HTTP Headers

Page 34: Rescue Me - Getting out of Meetings Using Twilio

Things We Hope…

The request is from Twilio

Page 35: Rescue Me - Getting out of Meetings Using Twilio

X-Twilio-Signature

Page 36: Rescue Me - Getting out of Meetings Using Twilio

X-Twilio-Signature

URL Path and Query String

POST Parameters

HMAC-SHA1 (Auth Token)

Page 37: Rescue Me - Getting out of Meetings Using Twilio

Shhhh…Your authentication token is a secret.

Page 38: Rescue Me - Getting out of Meetings Using Twilio

ValidateRequestTwilio Authentication: The Easy Way

Page 39: Rescue Me - Getting out of Meetings Using Twilio

Why are we building APIs using MVC?

Page 40: Rescue Me - Getting out of Meetings Using Twilio

Web API

Page 41: Rescue Me - Getting out of Meetings Using Twilio

Nope!• MVC Only

• Derives from Controller

• ValidateRequest uses MVC Filters

Page 42: Rescue Me - Getting out of Meetings Using Twilio

Twilio.WebApi• Nuget Package

• Derives from ApiController

• ValidateRequest works

• MVC Code-Compatible

Page 43: Rescue Me - Getting out of Meetings Using Twilio

Web APIIt’s easier, right?

Page 44: Rescue Me - Getting out of Meetings Using Twilio

Sending MessagesIt’s even easier

Page 45: Rescue Me - Getting out of Meetings Using Twilio

Rescue Me!

Page 46: Rescue Me - Getting out of Meetings Using Twilio
Page 47: Rescue Me - Getting out of Meetings Using Twilio

Web Role

Page 48: Rescue Me - Getting out of Meetings Using Twilio

Web Role

Azure Service Bus Queue

Worker Role

Page 49: Rescue Me - Getting out of Meetings Using Twilio

Web Role

Azure Service Bus Queue

Worker Role

Page 50: Rescue Me - Getting out of Meetings Using Twilio

Rescue Me!Web, Worker and Stuff

Page 51: Rescue Me - Getting out of Meetings Using Twilio

919-261-3536