SlideShare a Scribd company logo
#TWILIOCON
Twilio Messaging - Overviewand New
Feature Deep Dive
PATRICK MALATACK, DIRECTOR OF PRODUCT MANAGEMENT @ TWILIO
GOWRI RAO, PRODUCT MANAGER, MESSAGING @ TWILIO
#TWILIOCON
Hi. I’m Gowri.
I’m a Product Manager at Twilio.
gowri@twilio.com
#TWILIOCON
Hi. I’m Patrick.
I’m a Product Manager at Twilio.
patrick@twilio.com
#TWILIOCON
By the end of this talk,
1. Why is SMS so important?
you’ll be able to answer these questions.
2. How do I send an SMS using Twilio?
3. What is Concatenated Messaging and how do I use it? (new)
4. What is Twilio Picture Messaging and how do I use it? (new)
#TWILIOCON
What is SMS & why does it matter? A brief review.
Let’s take a quick look at the history of SMS and where we are today.
#TWILIOCON
What exactly is SMS?
Short Messaging Service (SMS) lets you send a message
(up to 160 characters) from a phone number you own
to any SMS enabled number in the world.
#TWILIOCON
Why should you care about SMS?
Twilio just lowered its
pricing to 3/4¢ per
message.
CHEAP
A lead contacted within
5 minutes is 100x more
likely to convert.
INSTANTTeenagers (18 - 24)
send 109.5 messages
per day on average.
POPULAR
Twilios APIs make it
super easy to integrate.
EASY
People send 41.5 SMS
messages per day on
average.
FAMILIAR
#TWILIOCON
of all humans use SMS
85%
messages to communicate.
140 Million
iOS users
480 Million
Android users
2.4 Billion
Internet Users
6 Billion
SMS Subscribers
Android Image Credit: Jan Sebastian bach, from The Noun Project
#TWILIOCON
Current SMS offerings. The State of the Union.
How can I use the existing Twilio services to send SMS updates?
#TWILIOCON
Sending SMS Messages: Phone Numbers
• Person-to-Person Messaging
• Self-service
• Local Experience
• Prohibited from High Volume
• Available in US, UK, & CA
#TWILIOCON
Sending SMS Messages: Short Codes
• Person-to-Person Messaging
• Self-service
• Local Experience
• Prohibited from High Volume
• Available in US, UK, & CA
#TWILIOCON
Where can I send to?
EVERYWHERE!
1300+ CARRIERS
200+ COUNTRIES
#TWILIOCON
How Stuff Works: Incoming Messages
!
GSM/CDMA
HTTP
Request
#TWILIOCON
!
GSM/CDMA
HTTP
Request
How Stuff Works: Outgoing Messages
#TWILIOCON
Sending a MessageExample:
POST	
  https://api.twilio.com/2010-­‐04-­‐01/
Accounts/AC123/SMS/Messages.json
	
  	
  From='894546'
	
  	
  To='16505766372'
	
  	
  Body='Come	
  check	
  out	
  our	
  new	
  fall	
  
	
  	
  fashions	
  http://www.twiliofashions.com/'
#TWILIOCON
Brevity is overrated. Introducing Concatenated Messages.
Let’s take a look at how Twilio helps you overcome the 160 character barrier.
#TWILIOCON
Previously: Break apart large messages
Each message was limited to 160 characters. Messages
larger than that had to be manually broken up into smaller
chunks.
#TWILIOCON
Today: Enter Message Concatenation
Twilio now supports messages up to 1,600 characters. No
more worrying about getting cut off mid sentence or
dealing with manual chunking.
#TWILIOCON
#1
#2
#3
#4
#3
#2
#4
#1
Message Concatenation: How does it work?
We use the new NumSegments property to keep track of the number of SMS
messages used to deliver your content.
#TWILIOCON
Seeing is believing. Introducing Twilio Picture Messages.
Let’s take a look at how Twilio helps you send rich media using the Universal
Messaging API.
#TWILIOCON
What does Twilio Picture Messaging look like?
Picture messaging (available on short codes) lets you display
media to directly to the user.
Before Now
#TWILIOCON
Twilio Picture Messaging: The Gritty Details
Currently available on US
Short Codes and to / from
US numbers.
USA ONLY
Pricing starts at 2¢ per
outbound message & 1¢ per
inbound message.
PRICING
You can attach a maximum
of 10 images per message.
UP TO 10 PHOTOS
#TWILIOCON
Twilio Picture Messaging: The Definitive Guide.
MEDIA
MESSAGES Similar to SMS, there is now a Message Resource. There
is also a corresponding <Message> TwiML verb which is
similar to <Sms>.
Messages now have a Media Sub-Resource which contains
any attached Pictures. There is also a corresponding
<Media> TwiML Noun for generating new Media Resources.
#TWILIOCON
Example #1: Sending a Picture
Let’s take a look at how to use the Messages endpoint to send a Twilio Picture
Message.
Copyright © twilio Inc. 2013PRIVATE & CONFIDENTIAL
POST to /Messages List Resource
• From
• To
• Body - can now be up to 1600 characters long
• MediaURL - The URL(s) of the image(s) you want to send with your message. If you wish to send
more than one image in your message, simply provide multiple MediaURLs
#TWILIOCON
Sending a Photo MessageExample:
POST	
  https://api.twilio.com/2010-­‐04-­‐01/
Accounts/AC123/SMS/Messages.json
	
  	
  From='894546'
	
  	
  To='16505766372'
	
  	
  Body='New	
  Dress	
  in	
  Stock'
	
  	
  MediaUrl='http://images.com/dress.png'
Copyright © twilio Inc. 2013PRIVATE & CONFIDENTIAL
/Messages/{Sid} Resource
• From
• To
• Body - can now be up to 1600 characters long
• NumSegments
• NumMedia - The number of media associated with the message. For instance, if you sent a message
with two images, this would be 2. If your message contained only text and no media this is 0
• /Media - Represents the set of media elements included with a given Message
#TWILIOCON
Example #2: Receiving a Message
Let’s use the Messages webhook to receive a picture message and take a
closer look at some of the new parameters that come along with it.
Copyright © twilio Inc. 2013PRIVATE & CONFIDENTIAL
/Messages Webhook
Backwards
Compatible
• From
• To
• Body - can now be up to 1600 characters long
• NumSegments
• NumMedia
• MediaURL {N} - URLs
• MediaContentType{N}
#TWILIOCON
New Param: MediaUrl#
Ex. MediaUrl0 → MediaUrlN
“MediaUrl0”:	
  “https://api.twilio.com/2010-­‐04-­‐01/...",
“MediaUrl1”:	
  “https://api.twilio.com/2010-­‐04-­‐01/...",
Each media attachment gets its own MediaUrl# parameter pointing
to the image hosted on the Twilio CDN.
#TWILIOCON
New Param: MediaContentType#
Ex. MediaContentType0 → MediaContentTypeN
“MediaContentType0”:	
  “image/png",
“MediaContentType1”:	
  “image/jpeg",
Each media attachment gets its own MediaContentType# parameter telling
you what kind of media it is (using the standard HTTP content types).
Twilio Messaging: Overview and New Feature Deep Dive
#TWILIOCON
Example #3: Replying to a message in TwiML
Let’s use TwiML to respond to the messages we receive with a Twilio Picture
Message.
#TWILIOCON
Example #3: Replying to a Message in TwiML
<?xml	
  version="1.0"	
  encoding="UTF-­‐8"?>
<Response>
	
  	
  <Message>
	
  	
  	
  	
  <Body>I'm	
  hungry!</Body>
	
  	
  	
  	
  <Media>http://www.images.com/cheesesteak.png</Media>
	
  	
  </Message>
</Response>
#TWILIOCON
Example #4: RESTfully Fetching Media
Let’s use the Twilio REST API to fetch the Media attachments for a message.
#TWILIOCON
GET	
  https://api.twilio.com/2010-­‐04-­‐01/Accounts/AC123/Messages/MM1234/Media.json
Example #4: RESTfully Fetching Media
We can issue a GET request to the Media sub-resource to get any Media objects.
QUESTIONS?

More Related Content

PDF
Twilio MMS Deep Dive
PDF
Smarter SIP Trunks: 6 Ways You Can Save Time and Get More Features
ODP
TWILIO SMS Introduction
PDF
Twiliobot at Google Wave Meetup 2009-09-14
PDF
Building Blocks for Next Generation Contact Centers
PPT
Twilio API: Build SMS Text Message Into Web Apps
PDF
Twilio Signal 2016 Keynote
Twilio MMS Deep Dive
Smarter SIP Trunks: 6 Ways You Can Save Time and Get More Features
TWILIO SMS Introduction
Twiliobot at Google Wave Meetup 2009-09-14
Building Blocks for Next Generation Contact Centers
Twilio API: Build SMS Text Message Into Web Apps
Twilio Signal 2016 Keynote

What's hot (20)

PDF
7 Principles of API Design - Waza
PDF
Open Source Software Business Model
PDF
Twilio Presentation
PDF
Twilio Product Overview
PDF
Building A Great API - Evan Cooke, Cloudstock, December 2010
PPTX
Supermondays twilio
PDF
Final Twilio Under the Radar 2009 Cloud
PDF
Twilio Presents at PariSoMa
PDF
Integrating Communications into CRM
PPTX
Twilio using Groovy Grails
PDF
Twilio Signal 2016 Real-time Communications Overview
PDF
Twilio Signal 2016 Build Your Own Cloud Enterprise VoIP
PDF
Hacking with Nexmo - at EmojiCon Hackathon
PPTX
Google voice
PDF
Building a Great Web API - Evan Cooke - QCON 2011
DOC
Google voice
PDF
The Nexmo Voice API - AAT 2016
PDF
Twilio Contact Center Overview
PPTX
Google Voice Presentation
PDF
Programmable Video Fundamentals
7 Principles of API Design - Waza
Open Source Software Business Model
Twilio Presentation
Twilio Product Overview
Building A Great API - Evan Cooke, Cloudstock, December 2010
Supermondays twilio
Final Twilio Under the Radar 2009 Cloud
Twilio Presents at PariSoMa
Integrating Communications into CRM
Twilio using Groovy Grails
Twilio Signal 2016 Real-time Communications Overview
Twilio Signal 2016 Build Your Own Cloud Enterprise VoIP
Hacking with Nexmo - at EmojiCon Hackathon
Google voice
Building a Great Web API - Evan Cooke - QCON 2011
Google voice
The Nexmo Voice API - AAT 2016
Twilio Contact Center Overview
Google Voice Presentation
Programmable Video Fundamentals

Viewers also liked (18)

PDF
Twilio Web Service API for building Voice Applications
PDF
Twilio Voice Applications with Amazon AWS S3 and EC2
PDF
What Can You Do With Twilio
PPTX
Best practices of modern marketing & sales for talent acquisition leaders
PDF
Call Tracking with Twilio - Cloudstock 2010
PDF
Global Phone Numbers: Taking Your App Around The World
PPTX
Hashtag Aggregation - Tools
PDF
Pitch Influencer Marketing to your Boss
PDF
Influencer Marketing with Klear
KEY
Deploying Next Gen Systems with Zero Downtime
PDF
Why All Industries will be Software Industries - unSexy Conference 2013 - We ...
PDF
Lead Gen in the Post-PC World - LeadsCon 2012
PDF
Twilio Signal 2016 Leading An Open Hardware Revolution
PDF
Twilio Signal 2016 WebRTC Reborn
PPTX
Productizing Twilio Applications
PPTX
Influencer Marketing Plan [template]
PDF
Scaling Company Values - Twilio - TechWeek 2012
PDF
Scaling Twilio - Evan Cooke - Twilio Conference 2011
Twilio Web Service API for building Voice Applications
Twilio Voice Applications with Amazon AWS S3 and EC2
What Can You Do With Twilio
Best practices of modern marketing & sales for talent acquisition leaders
Call Tracking with Twilio - Cloudstock 2010
Global Phone Numbers: Taking Your App Around The World
Hashtag Aggregation - Tools
Pitch Influencer Marketing to your Boss
Influencer Marketing with Klear
Deploying Next Gen Systems with Zero Downtime
Why All Industries will be Software Industries - unSexy Conference 2013 - We ...
Lead Gen in the Post-PC World - LeadsCon 2012
Twilio Signal 2016 Leading An Open Hardware Revolution
Twilio Signal 2016 WebRTC Reborn
Productizing Twilio Applications
Influencer Marketing Plan [template]
Scaling Company Values - Twilio - TechWeek 2012
Scaling Twilio - Evan Cooke - Twilio Conference 2011

Similar to Twilio Messaging: Overview and New Feature Deep Dive (20)

PPTX
How to Integrate Text and Phone Messaging with your Website
PDF
Watson DevCon 2016 - Do More with Less Code: Enriched Communications with Twi...
PDF
IGCSE ICT (0417) - Communication - Ajiro Tech
PPT
Ims Gc 2007 V2
PDF
TwilioCon 2013 - Communications Without Boundaries
PDF
Intergen Smarts 9 (2005)
PDF
Emerging Threats - The State of Cyber Security
PDF
Screencast.com getting started_guide
PPT
Ain inphosoft inpho_connect_v1_sales presentation_v1.1
PDF
Twitter Success guide
PPTX
TigerText Presentation
PPT
Michael Pranikoff - PRSA Northeast Conference 9/11/08
PDF
Handwriting Paper Numbered Lined Paper - Numbered Lin
PPTX
Attracting (and keeping) wider audiences with internet content.
PPSX
IntelliSMS - Telco Grade, SMS Gateway and Technology Provider
PPT
Get More From Your Messages with Twilio + Watson Add-Ons
PDF
Twittex - From Idea To Live in Seven Days
PPTX
Twilio connector
PPT
Twitter And Its Tools By Robin
PPTX
B.Com 5th sem
How to Integrate Text and Phone Messaging with your Website
Watson DevCon 2016 - Do More with Less Code: Enriched Communications with Twi...
IGCSE ICT (0417) - Communication - Ajiro Tech
Ims Gc 2007 V2
TwilioCon 2013 - Communications Without Boundaries
Intergen Smarts 9 (2005)
Emerging Threats - The State of Cyber Security
Screencast.com getting started_guide
Ain inphosoft inpho_connect_v1_sales presentation_v1.1
Twitter Success guide
TigerText Presentation
Michael Pranikoff - PRSA Northeast Conference 9/11/08
Handwriting Paper Numbered Lined Paper - Numbered Lin
Attracting (and keeping) wider audiences with internet content.
IntelliSMS - Telco Grade, SMS Gateway and Technology Provider
Get More From Your Messages with Twilio + Watson Add-Ons
Twittex - From Idea To Live in Seven Days
Twilio connector
Twitter And Its Tools By Robin
B.Com 5th sem

More from Twilio Inc (20)

PDF
Create an IVR that Keeps Up with Your Customers
PDF
Salesforce’s Andy Kung on the Power of CRM Integrations
PPTX
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call Center
PDF
Why Mobile Messaging Works?
PDF
Understand How Consumers Use Messaging
PDF
How To Track Calls Using Twilio?
PDF
Twilio Signal 2016 Using Add-ons
PDF
Twilio Signal 2016 Technical Blogging
PDF
Twilio Signal 2016 Serverless Contact Center
PDF
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + Twilio
PDF
Twilio Signal 2016 IoT Using LittleBits and Twilio SMS
PDF
Twilio Signal 2016 Chaos Patterns
PPTX
Twilio Signal 2016 How to Impact Non-profits
PDF
Twilio Signal 2016 Bringing P2P to the Masses with WebRTC
PDF
Twilio Signal 2016 Listing Services and Lead Generation
PDF
Twilio Signal 2016 Bots
PDF
Twilio Signal 2016 Taking Your SMS App Global
PDF
Twilio Signal 2016 Omni-channel Routing Bots
PDF
Twilio Signal 2016 New Documentation
PDF
Twilio Signal 2016 How to Build Next Generation Speech Analytics
Create an IVR that Keeps Up with Your Customers
Salesforce’s Andy Kung on the Power of CRM Integrations
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call Center
Why Mobile Messaging Works?
Understand How Consumers Use Messaging
How To Track Calls Using Twilio?
Twilio Signal 2016 Using Add-ons
Twilio Signal 2016 Technical Blogging
Twilio Signal 2016 Serverless Contact Center
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + Twilio
Twilio Signal 2016 IoT Using LittleBits and Twilio SMS
Twilio Signal 2016 Chaos Patterns
Twilio Signal 2016 How to Impact Non-profits
Twilio Signal 2016 Bringing P2P to the Masses with WebRTC
Twilio Signal 2016 Listing Services and Lead Generation
Twilio Signal 2016 Bots
Twilio Signal 2016 Taking Your SMS App Global
Twilio Signal 2016 Omni-channel Routing Bots
Twilio Signal 2016 New Documentation
Twilio Signal 2016 How to Build Next Generation Speech Analytics

Recently uploaded (20)

PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
cuic standard and advanced reporting.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Electronic commerce courselecture one. Pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Spectral efficient network and resource selection model in 5G networks
“AI and Expert System Decision Support & Business Intelligence Systems”
cuic standard and advanced reporting.pdf
Review of recent advances in non-invasive hemoglobin estimation
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Empathic Computing: Creating Shared Understanding
Mobile App Security Testing_ A Comprehensive Guide.pdf
Electronic commerce courselecture one. Pdf
MYSQL Presentation for SQL database connectivity
Dropbox Q2 2025 Financial Results & Investor Presentation
NewMind AI Monthly Chronicles - July 2025
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Diabetes mellitus diagnosis method based random forest with bat algorithm
20250228 LYD VKU AI Blended-Learning.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Network Security Unit 5.pdf for BCA BBA.
Spectral efficient network and resource selection model in 5G networks

Twilio Messaging: Overview and New Feature Deep Dive

  • 1. #TWILIOCON Twilio Messaging - Overviewand New Feature Deep Dive PATRICK MALATACK, DIRECTOR OF PRODUCT MANAGEMENT @ TWILIO GOWRI RAO, PRODUCT MANAGER, MESSAGING @ TWILIO
  • 2. #TWILIOCON Hi. I’m Gowri. I’m a Product Manager at Twilio. gowri@twilio.com
  • 3. #TWILIOCON Hi. I’m Patrick. I’m a Product Manager at Twilio. patrick@twilio.com
  • 4. #TWILIOCON By the end of this talk, 1. Why is SMS so important? you’ll be able to answer these questions. 2. How do I send an SMS using Twilio? 3. What is Concatenated Messaging and how do I use it? (new) 4. What is Twilio Picture Messaging and how do I use it? (new)
  • 5. #TWILIOCON What is SMS & why does it matter? A brief review. Let’s take a quick look at the history of SMS and where we are today.
  • 6. #TWILIOCON What exactly is SMS? Short Messaging Service (SMS) lets you send a message (up to 160 characters) from a phone number you own to any SMS enabled number in the world.
  • 7. #TWILIOCON Why should you care about SMS? Twilio just lowered its pricing to 3/4¢ per message. CHEAP A lead contacted within 5 minutes is 100x more likely to convert. INSTANTTeenagers (18 - 24) send 109.5 messages per day on average. POPULAR Twilios APIs make it super easy to integrate. EASY People send 41.5 SMS messages per day on average. FAMILIAR
  • 8. #TWILIOCON of all humans use SMS 85% messages to communicate. 140 Million iOS users 480 Million Android users 2.4 Billion Internet Users 6 Billion SMS Subscribers Android Image Credit: Jan Sebastian bach, from The Noun Project
  • 9. #TWILIOCON Current SMS offerings. The State of the Union. How can I use the existing Twilio services to send SMS updates?
  • 10. #TWILIOCON Sending SMS Messages: Phone Numbers • Person-to-Person Messaging • Self-service • Local Experience • Prohibited from High Volume • Available in US, UK, & CA
  • 11. #TWILIOCON Sending SMS Messages: Short Codes • Person-to-Person Messaging • Self-service • Local Experience • Prohibited from High Volume • Available in US, UK, & CA
  • 12. #TWILIOCON Where can I send to? EVERYWHERE! 1300+ CARRIERS 200+ COUNTRIES
  • 13. #TWILIOCON How Stuff Works: Incoming Messages ! GSM/CDMA HTTP Request
  • 15. #TWILIOCON Sending a MessageExample: POST  https://api.twilio.com/2010-­‐04-­‐01/ Accounts/AC123/SMS/Messages.json    From='894546'    To='16505766372'    Body='Come  check  out  our  new  fall      fashions  http://www.twiliofashions.com/'
  • 16. #TWILIOCON Brevity is overrated. Introducing Concatenated Messages. Let’s take a look at how Twilio helps you overcome the 160 character barrier.
  • 17. #TWILIOCON Previously: Break apart large messages Each message was limited to 160 characters. Messages larger than that had to be manually broken up into smaller chunks.
  • 18. #TWILIOCON Today: Enter Message Concatenation Twilio now supports messages up to 1,600 characters. No more worrying about getting cut off mid sentence or dealing with manual chunking.
  • 19. #TWILIOCON #1 #2 #3 #4 #3 #2 #4 #1 Message Concatenation: How does it work? We use the new NumSegments property to keep track of the number of SMS messages used to deliver your content.
  • 20. #TWILIOCON Seeing is believing. Introducing Twilio Picture Messages. Let’s take a look at how Twilio helps you send rich media using the Universal Messaging API.
  • 21. #TWILIOCON What does Twilio Picture Messaging look like? Picture messaging (available on short codes) lets you display media to directly to the user. Before Now
  • 22. #TWILIOCON Twilio Picture Messaging: The Gritty Details Currently available on US Short Codes and to / from US numbers. USA ONLY Pricing starts at 2¢ per outbound message & 1¢ per inbound message. PRICING You can attach a maximum of 10 images per message. UP TO 10 PHOTOS
  • 23. #TWILIOCON Twilio Picture Messaging: The Definitive Guide. MEDIA MESSAGES Similar to SMS, there is now a Message Resource. There is also a corresponding <Message> TwiML verb which is similar to <Sms>. Messages now have a Media Sub-Resource which contains any attached Pictures. There is also a corresponding <Media> TwiML Noun for generating new Media Resources.
  • 24. #TWILIOCON Example #1: Sending a Picture Let’s take a look at how to use the Messages endpoint to send a Twilio Picture Message.
  • 25. Copyright © twilio Inc. 2013PRIVATE & CONFIDENTIAL POST to /Messages List Resource • From • To • Body - can now be up to 1600 characters long • MediaURL - The URL(s) of the image(s) you want to send with your message. If you wish to send more than one image in your message, simply provide multiple MediaURLs
  • 26. #TWILIOCON Sending a Photo MessageExample: POST  https://api.twilio.com/2010-­‐04-­‐01/ Accounts/AC123/SMS/Messages.json    From='894546'    To='16505766372'    Body='New  Dress  in  Stock'    MediaUrl='http://images.com/dress.png'
  • 27. Copyright © twilio Inc. 2013PRIVATE & CONFIDENTIAL /Messages/{Sid} Resource • From • To • Body - can now be up to 1600 characters long • NumSegments • NumMedia - The number of media associated with the message. For instance, if you sent a message with two images, this would be 2. If your message contained only text and no media this is 0 • /Media - Represents the set of media elements included with a given Message
  • 28. #TWILIOCON Example #2: Receiving a Message Let’s use the Messages webhook to receive a picture message and take a closer look at some of the new parameters that come along with it.
  • 29. Copyright © twilio Inc. 2013PRIVATE & CONFIDENTIAL /Messages Webhook Backwards Compatible • From • To • Body - can now be up to 1600 characters long • NumSegments • NumMedia • MediaURL {N} - URLs • MediaContentType{N}
  • 30. #TWILIOCON New Param: MediaUrl# Ex. MediaUrl0 → MediaUrlN “MediaUrl0”:  “https://api.twilio.com/2010-­‐04-­‐01/...", “MediaUrl1”:  “https://api.twilio.com/2010-­‐04-­‐01/...", Each media attachment gets its own MediaUrl# parameter pointing to the image hosted on the Twilio CDN.
  • 31. #TWILIOCON New Param: MediaContentType# Ex. MediaContentType0 → MediaContentTypeN “MediaContentType0”:  “image/png", “MediaContentType1”:  “image/jpeg", Each media attachment gets its own MediaContentType# parameter telling you what kind of media it is (using the standard HTTP content types).
  • 33. #TWILIOCON Example #3: Replying to a message in TwiML Let’s use TwiML to respond to the messages we receive with a Twilio Picture Message.
  • 34. #TWILIOCON Example #3: Replying to a Message in TwiML <?xml  version="1.0"  encoding="UTF-­‐8"?> <Response>    <Message>        <Body>I'm  hungry!</Body>        <Media>http://www.images.com/cheesesteak.png</Media>    </Message> </Response>
  • 35. #TWILIOCON Example #4: RESTfully Fetching Media Let’s use the Twilio REST API to fetch the Media attachments for a message.
  • 36. #TWILIOCON GET  https://api.twilio.com/2010-­‐04-­‐01/Accounts/AC123/Messages/MM1234/Media.json Example #4: RESTfully Fetching Media We can issue a GET request to the Media sub-resource to get any Media objects.