Twilio using Groovy Grails

Post on 16-Apr-2017

123 views 1 download

Transcript of Twilio using Groovy Grails

TwilioTHE CLOUD COMMUNICATIONS PLATFORM

By - Ali Tanwir

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

I am Ali Tanwir

Hello!

You can email me at◉ ali.tanwir@nexthoughts.com

Introduction1

Focus your resources and time on tailoring experiences, not

building from scratch.

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

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

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

Getting started..

Get set go!3

❂ 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'}

Know Twilio API - REST API & TwiML

About TWILIO API4

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

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

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

Twilio VOICE API

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

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.

Benefits of TWILIO 6

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

Demo

7

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

Any questions ?You can email me at◉ ali.tanwir@nexthoughts.com

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

roovy-grails-demo

Thanks!