Twilio using Groovy Grails

21
Twilio THE CLOUD COMMUNICATIONS PLATFORM By - Ali Tanwir

Transcript of Twilio using Groovy Grails

Page 1: Twilio using Groovy Grails

TwilioTHE CLOUD COMMUNICATIONS PLATFORM

By - Ali Tanwir

Page 2: Twilio using Groovy Grails

Agenda★ Introduction★ How does it work?★ Get Set Go!★ About Twilio API★ Features of Twilio★ Benefits of Twilio★ Demo★ References

Page 3: Twilio using Groovy Grails

I am Ali Tanwir

Hello!

You can email me at◉ [email protected]

Page 4: Twilio using Groovy Grails

Introduction1

Page 5: Twilio using Groovy Grails

Focus your resources and time on tailoring experiences, not

building from scratch.

Page 6: Twilio using Groovy Grails

TWILIO was founded in 2007 by Jeff Lawson, Evan Cooke, and John Wolthuis and was originally based in both Seattle, Washington, and San Francisco, California.

It is a cloud communications platform which allows software developers to programmatically make and receive phone calls and send and receive text messages using its web service APIs.

TWILIO API have support for various languages like - PHP, .NET (C#), PYTHON, JAVA, RUBY

Page 7: Twilio using Groovy Grails

How does it works?2How message are handled by Twilio

Page 8: Twilio using Groovy Grails

How message sending works

1 User sends SMS

TWILIO

Application

2 Twilio pings Application

3 Application connects with DB to retrieve data

Database

4 DB returns the data

5 Application sends SMS via Twilio API

6 User receives SMS via Twilio API

Page 9: Twilio using Groovy Grails

Getting started..

Get set go!3

Page 10: Twilio using Groovy Grails

❂ Add Twilio dependency into your application BuildConfig.groovy file,

❂ Create an account in Twilio https://www.twilio.com/❂ Get verified your mobile number❂ Get a Twilio phone number❂ Write a code using Twilio helper libraries for handling calls and

messages❂ Set the POST url for the number which will call your application

action❂ All set! To starting sending/receiving messages or making calls

dependencies{compile 'com.twilio.sdk:twilio-java-

sdk:3.4.5'}

Page 11: Twilio using Groovy Grails

Know Twilio API - REST API & TwiML

About TWILIO API4

Page 12: Twilio using Groovy Grails

REST APIThe Twilio REST API allows you to query meta-data about your account, phone numbers, calls, text messages, and recordings. You can also do some fancy things like initiate outbound calls and send text messages.For reference:

◉ https://www.twilio.com/docs/api/rest◉ https://www.twilio.com/docs/api/rest

/sending-messages

Twilio - REST API & TwiML

TwiMLThe Twilio Markup Language is a set of instructions you can use to tell Twilio what to do when you receive an incoming call or SMS.TwiML is similar to HTML. Only one TwiML document is rendered to the caller at once, but many documents can be linked together to build complex interactive voice applications.For reference:https://www.twilio.com/docs/api/twiml

Page 13: Twilio using Groovy Grails

Features of TWILIO 5Messaging API, Voice API and Twilio Clients

Page 14: Twilio using Groovy Grails

Twilio MESSAGE API

◉ Receive SMS and MMS messages to your Twilio phone numbers and reply back with SMS and MMS messages

◉ Send SMS and MMS messages using Twilio's REST API◉ Track SMS conversations◉ Send SMS messages during phone calls

Page 15: Twilio using Groovy Grails

Twilio VOICE API

◉ Play audio and text◉ Record audio◉ Conferencing◉ Real time status◉ Global reach◉ Convert speech to text

Page 16: Twilio using Groovy Grails

Twilio CLIENTS

Lets any browser, phone or tablet interact using only a data connection. Using Twilio you can embed voice directly into your web, iPhone or Android apps.

Page 17: Twilio using Groovy Grails

Benefits of TWILIO 6

Page 18: Twilio using Groovy Grails

Twilio Benefits

◉ Set geographic permission for messaging and calling◉ Monitor your API◉ Maintain log details◉ Can export CSV of logs◉ Can use TWILIO API with - PHP, .NET (C#), PYTHON,

NODE Js, JAVA, RUBY

Page 19: Twilio using Groovy Grails

Demo

7

Page 20: Twilio using Groovy Grails

References

◉ Twilio Tutorials https://www.twilio.com/docs/tutorials◉ REST API: Sending SMS or MMS

https://www.twilio.com/docs/api/rest/sending-messages◉ REST API: Calls https://www.twilio.com/docs/api/rest/call◉ Twilio API Explorer

https://www.twilio.com/user/account/developer-tools/api-explorer/message-create

◉ REST API Test Credentials https://www.twilio.com/docs/api/rest/test-credentials

◉ PPT overview http://www.slideshare.net/naincygupta35574/twilio-sms?qid=da65045e-a26d-4491-8f26-eeacf1fb6a43&v=&b=&from_search=46

8

Page 21: Twilio using Groovy Grails

Any questions ?You can email me at◉ [email protected]

You can find the code used with this presentation at:◉ https://bitbucket.org/alitanwir/twilio-using-g

roovy-grails-demo

Thanks!