The modern web application stack can grow very complex. Databases, web servers, Ruby processes, AWS instances, API integrations – all of them play an important role in the experience you deliver to your users. You need to make sure they’re all performing optimally, but that can be a challenge requiring a wide variety of tools.
New Relic, an industry-leading SaaS solution for application performance monitoring, is empowering developers to meet this challenge with the New Relic Platform. This new platform provides a seamless new way to monitor the performance of any technology in your stack through a single interface.
Team Twilio is very excited to announce that you can now monitor your voice and messaging traffic using the New Relic Platform! Developers can use the Twilio plugin for New Relic to pull in near real-time usage data from the Twilio API, and integrate that data into the comprehensive monitoring tools provided by New Relic. Now, you can monitor your voice and messaging traffic in the same way as your database reads, cache hits, or message queuing. This integration will allow developers to gain new insights from their Twilio data, and correlate it with vital metrics from other components of their application stack.
It’s super easy to get started. Simply log into your New Relic account, and click on the new “Plugins” tab on the left navigation. Scroll down or search for “Twilio”, and follow the link to access simple setup instructions that will have you pulling in your Twilio data within minutes.
We can’t wait to see what new insights you gain with this powerful new tool!
Josh Homme has sold out stadiums, played with the who’s who of the rock music world, and produced critically acclaimed albums with his band Queens of the Stone Age. He writes music, not code but that’s where developer Lee Martin (pictured right) comes in.
When Homme wanted to make an interactive experience to promote his band’s latest album …Like Clockwork, he turned to Lee for help. The goal was to create a feature that would capture the personality of the record, and the attention of fans. Lee figured a good way to grab someone’s attention is to ask for their number. A better way is to have a clown ask for their number.
Getting A Call From A Clown
When Queens of the Stone Age fans go to …Like Clockworks’ website they’ll see a live image of a creepy clown standing next to a rotary phone. Below the image is a phone icon and 10 blank spaces. When the curious fan enters his phone number they’ll see the clown dial their number on the rotary phone and realtime. Then they’ll receive a call via Twilio, and hear a voice on the line reciting QOTSA’s lyrics “Keep Your Eyes Peeled”. When the voice hangs up, they get a text promoting the new album.
Over 20,000 QOTSA fans dialed in.
Josh is “like an open faucet of creativity and mischief,” says Lee. To make Josh’s vision and the mischievous clown come to life Lee used the Twilio API to call QOTSA fans and Pusher to update the video in real time. “Twilio is perfect for creating magic like this,” said Lee.
For Lee, the project was more than just a chance to work with QOTSA and a fun hack, it marked a proverbial “restart” of his career.
After working at SoundCloud, and SAM from Los Angeles, Lee decided it was time to return home to his native Louisiana where his 10-year career as music–minded hacker started. “I began as a freelancer from my bedroom. I’m trying to have a fresh restart of open-minded creativity by working in a place that works at my current speed: The Big Easy!” said Lee.
To try out “…Like Phonework” visit QOTSA’s website here. To learn more about Lee Martin visit his website here, and read his technical post on creating …Like Phonework
Kayaking is fun. Searching for the paperwork you filled out to go on a kayak tour is not fun. Checkfront aims to automate booking processes so both companies and customers have less to worry about.
The Checkfront online reservation system allows companies to log their booking and reservation information through web portal that integrates into their existing website, without any redesign work. The goal of the service is to get all of the customer’s key information in one place and keep it organized.
Grant Jurgeneit, CEO of Checkfront, saw how messy travel plans can get when he volunteered to book a vacation for his family and friends. He combed through emails, voicemails, and texts from his loved ones as well as hotel and car services. It was far too difficult to do something so simple. He decided to build the solution. “We wanted to build a system that was organized and could scale booking for everything from kite surfing to airport parking.”
Say you’re running a bike rental service. Using Checkfront, you can update bike inventory, bike tour schedules, pricing, and process payments for reservations. To keep customers in the loop, you can use Checkfront’s Twilio SMS integration to send them the details of their reservation as soon as they book a bike. You can also notify that customer right before their reservation starts via SMS
“Being able to leverage SaaS based applications has been hugely advantageous,” says Grant. In addition to their Twilio integration, Checkfront’s online booking software also integrates with platforms like MailChimp, Apple Passbook, Salesforce and Constant Contact.
Grant and his team are currently building out their API platform, allowing developers and businesses to create new tools to automate booking processes.
To learn more about Checkfront, visit their website here.
The following is a guest post by Chris Ismael, Developer Evangelist at Mashape, a cloud API hub allowing developers to discover and distribute APIs. Learn more about Chris here.
Hi, my name is Chris Ismael, Developer Evangelist from Mashape. In this tutorial, we will build a phone service that lets you translate messages to your preferred language using SMS. The service will also call you back with a native language pronunciation of the translated message. Here’s a quick video demo:
We will do this using node.js, and a couple of APIs:
Twilio APIs for SMS and voice
APIs from Mashape to let us detect language and translate messages. We will also use a text-to-voice API to read out the message in a native language pronunciation.
You can find the source code here on Github. Try out the service by sending an SMS message to +1 (415) 992-9984 like “Take me to the bar ES”. The “ES” stands for Spanish. You can try other languages such as “DE”, “IT”, etc. You can also translate a non-English message like “Hola mundo en”.
Let’s get started!
How do we interact with Twilio?
Twilio makes it easy for our applications to send and receive messages and calls. There’s a lot more you can do with the Twilio API and I encourage you to check out this page for an overview. For our app, receiving, sending SMS, and calling back are the things we need to do. Here’s a diagram of the process flow from our phones, to Twilio, to our app, and back.
Receiving an SMS in Twilio – To do this, we need to register for a Twilio account in order to a) get a Twilio number where our SMS messages will be sent, and b) associate that number with the URL of our app that will get called whenever it gets an SMS. Here’s what mine looks like after setting it up (note that I blurred the app name to lessen the possibility for abuse. You can also set up authentication but I’ll let you check that out in your spare time)
Here’s the snippet of node.js code that receives the POST request from Twilio as a result of sending an SMS to the number above. We are simply getting the SMS message, the sender’s phone number, and number the message it was sent to (which is my number above)
Sending an SMS from Twilio – To get Twilio to do stuff, we need to respond to it with an XML file (they call it TwiML) that contains instructions such as sending an SMS, calling a phone, playing audio, and more. When a user sent an SMS to our Twilio number, Twilio will expect a TwiML back so it will know what to do next. Here’s a function that sends back a TwiML to Twilio to send an SMS back to the message sender:
Calling a phone from Twilio – To call a phone from Twilio, we can use their REST endpoint as described in the code below. One thing to note is that aside from the ‘From’ and ‘To’ fields (phone numbers), the ‘Url’ parameter expects a TwiML response that contains instructions on what Twilio should do when the call is picked up. (We will explore this in number 4 below shortly):
Playing audio when call is picked up – In the code below, we are sending back a TwiML to Twilio that plays either Twilio’s default voice, or a link to an mp3. This will be played to the person we’re calling from Twilio when he/she picks it up. Also note in the code below that we are introduced to a Mashape API that does text-to-voice for us:
What is Mashape and how do I call their APIs?
Mashape is a Cloud API Marketplace where you can discover interesting and cool APIs for your apps. If you developed your own API, you can add them to Mashape too so that more developers can discover them. You can find a list of 40+ machine learning APIs here! For this project, we used the following APIs:
Text To Voice - a wrapper to Google Translate that saves the mp3 audio to a public URL in Dropbox
Each of the links above will take you to a Mashape documentation page. It provides a test console, among other things, to help developers test the API before actually using it for their apps.
You need to have a Mashape account in order to use the test console, and most importantly to use the API in your app. Go on and register for a Mashape account, we’ll wait for you below.
Once you have signed up, you will get a Mashape key that you can use for all the APIs in Mashape. (Do note that some APIs require a paid subscription.)
You’ve already seen how to call a Mashape API from number 4 above. If you’re wondering where the url and X-Mashape-Authorization values came from, you can inspect the curl request from the Mashape test console, as below:
As you’ve probably noticed, there are also code snippets for Java, PHP, Python, Obj-C, and Ruby. Go ahead and check them out.
Piecing them all together
So far, we’ve described the major components of our service. Hopefully this has given you a good understanding of how each part fits. We won’t go into the nitty gritty of explaining each part line by line. Instead, you can check out the source code in its full glory in Github here.
The important thing to remember here is the flow from the user, to Twilio, to our node.js app, and back:
We also do a REST call to Twilio that initiates the call to the user. When the user picks up the call, we call the text-to-voice Mashape API to give us a public URL of the translated voice audio mp3. We then send back a TwiML to Twilio that plays back this mp3 to the user. (Line 112 and 156 from index.js)
I hope this tutorial was useful. Please send me a note at firstname.lastname@example.org if you have questions, comments, or feedback! Happy coding!
The world of communications is undergoing the largest change since the invention of the telephone. What was once stagnant, expensive, and esoteric – an industry still coasting on the legacies of national monopolies around the world – is becoming a vibrant hotbed of innovation due to one main thing – the rise of Software People who are changing everything.
In fact, there are two important macro-changes afoot. First, in businesses around the world, from SMBs to the mid-market to the enterprise, software is migrating from the closet to the cloud. Instead of 100,000 businesses all running their own copies of “big hardware” and “big software” in their own dank closets and datacenters, they’re turning to multi-tenant clouds. CRM has undergone this transition. What was once a multi-million dollar, multi-year Siebel implementation is now a credit card and an afternoon on Salesforce.com. This story has been told ad-nauseum – but what’s most interesting is that every company – big and small, from a three person sales team to a 30,000 person global salesforce – has access to the best-of-breed, always updated software with no administration. Category after category has undergone this transition – and the closet to cloud migration in communications is happening now. Without a doubt, in 10 years, the overwhelming majority of our corporate communications applications will be delivered from the cloud. In this transition, new winners will emerge, and many of today’s incumbents will fall. You, the Software People, are building this future in the cloud.
Second, and even more exciting, is the migration from communicating on “special purpose devices” to “general purpose computers.” Think about it: ten years ago, if you wanted to make a telephone call, you picked up a telephone – a device manufactured to do that one thing forever. On the day it rolled off the assembly line, it had all the capabilities it would ever have. Want a new feature? Throw that thing away and buy a new device. Innovation was largely limited to those who manufactured this gear — people who understood the esoteric composition of circuits and connectivity that comprised telecommunications. But today, you pick up a general-purpose computer – your iPhone, your Android, your browser. Advancements are no longer limited to the slow pace of companies manufacturing telecom guts – servers in closets and plastic on our desks. With the software mindset, most anything we can imagine is not just possible, but inevitable.
Communications is becoming integrated into everything we do, not just a phone on the desk and 10 digits to punch in. Power has shifted to the Software People who are rolling communications into their companies, their applications and their workflows – and creating great experiences for their customers in the process.
These two shifts are permanently and significantly changing the face of the trillion-dollar communications industry. Instead of one application — the phone call — the future is a million context-specific interactions. Going forward, APIs are the new dialtone and Twilio exists to empower you — the Software People — to invent the future of human interaction every day.
Our existing and new investors share this vision of the coming world of software-defined communications and the opportunities it presents not just for Twilio, but more importantly for our customers. We raised this Series D investment round to continue to accelerate the pace of innovation we can affect for our customers. Our mission — to change communications forever – is just beginning.
We’ve got great new products in the pipeline, we’re bringing Twilio to more geographies around the world, and we look forward to working with more and more of the world’s best developers and companies. We want to change communications forever by empowering you to build the future of your industries and create great experiences for your customers – and we can’t wait to see what you’ll build next.
Last week, we announced a contest to send one lucky node.js hacker to NodeConf 2013. We had a bunch of amazing entries, but the hack that stood out as the most useful and innovative use of the API was SMSFoo, by Jed Wood(pictured right).
About The Hack
Wufoo is an online form builder which makes it incredibly easy to build and distribute web forms. SMSFoo SMS-enables forms you’ve built in Wufoo, so you can distribute them and collect responses via SMS. This enables you to use Wufoo forms to collect information from users without internet access, or on any mobile device. Very cool stuff.
Jed has spent the past decade bridging the gap between design and programming by creating rapid prototypes and production applications. He recently served as a Presidential Innovation Fellow. Now he’s back in Chicago, spending most of his time building and connecting APIs with node.js.
Here in the Twilio Europe office, right in the heart of London, we’re always hearing about cool and exciting projects happening in the local tech scene. London is one of the most beautiful and vibrant cities for doers, builders, dreamers and creators that I’ve ever had the fortune to live in – and this week, we’re absolutely over the moon to be supporting a great project by tech-space-sourcing foundation Shoreditch Works.
Shoreditch, as this video explains, is an area of London widely known as ‘Silicon Roundabout’ thanks to the huge number of tech companies that inhabit it. There are great co-working spaces, meeting rooms, and coffee houses, but the Shoreditch Works team still felt that there was something missing.
A Place For DOers
Wouldn’t it be great if there was a ‘village hall’ for the doers? A place where people in the Shoreditch tech community are always welcome, a space to, in their own words, “help young companies get started and grow.”
That’s just what Shoreditch Works decided to do. Thanks to a kickstarter campaign, their vision of “a space where kids can come and code after school, where artists can present their work, where local meetups can take place and where our co-workers can meet and discuss their issues” is going to become a reality!
If you didn’t think that was enough, they’ll also be giving 20% of all the time slots in the new 200 seat event space contained within the building for free to community groups that are important but don’t necessarily have the cash to hire a big events space.
The Power of Community Spirit
With backing from almost 300 individuals, startups and local tech companies on their Kickstarter page, the project looks set to rock the tech scene in London and provide a space for people do create, dream, build and DO for years to come.
From everyone here at Twilio, we wish Shoreditch Works’ new Village Hall all the very best. We’ll join you for a coffee soon!
Developer Hung Truong started putting together basic websites when Geocities was still in style (if it ever was). Now, Hung is an iOS developer at a creative marketing company in Ann Arbor Michigan. In his free time he likes making apps (like award winning Weathergram) that help automate daily tasks from turning your lights on and off, checking in on Foursquare, and checking the weather.
We talked to Hung about how he got started coding, what type of apps he’s interested in building with Twilio, his Callin’ Oates inspiration, and why code literacy is so important.
We profiled Hung Truong and featured his developer profile on the front page of the DOer Gallery. If you’d like to share your story on the blog, create your DOer profile and email email@example.com
What’s your background in coding and when did you get started?
I got my start making really basic web pages on Tripod and Geocities back when I was in middle school. I was basically making documents and linking them together.
It wasn’t until college that I started coding formally, which is a bit atypical of the stories you’ll hear of hackers getting started by writing compilers at the age of 6. Around my Junior year in college I got really interested in blogging, which led me to learning PHP for WordPress and Ruby on Rails for writing other web based apps. I’ve also picked up some Python for general scripting and Objective C for writing native iOS apps. Lately I’ve been learning Chef to automate my server provisioning.
You’ve put together some really interesting projects from Weathergram, to Checkmate, to MapsKreig. What unites them?
Weathergram is a Twilio service that you can call to get your weather forecast in the form of song. It’s inspired by the other Twilio project, Callin’ Oates. I also have another project called Instascriber that automatically adds new items to Instapaper via RSS.
Most of my projects were built to automate some kind of task for myself, and by releasing them as apps or web apps, I’ve been able to share them with a lot of people.
How are you using Twilio?
I am mostly using Twilio for personal side projects. I’ve been playing around with an idea for an app that sends you a text message when it’s time to go catch your bus so you don’t have to spend a lot of time waiting for it.
What project are you working on currently and do you have anything in the works?
I have big plans for an app that ties in a variety of data sources for home automation and security. I’m using the Belkin Wemo for controlling light switches in my house and monitoring for motion. I want to tie that in with an iOS app that uses geofencing to let my apartment know when I’m home and when I’m away. I’d also like to integrate a Lockitron and other “internet of things” devices. I think there is a small wave of these sorts of devices on the horizon with a really huge wave coming after that, when the feasibility of such devices has been proven.
Anything you’d like to add?
One idea that’s gained popularity recently is code literacy: the idea that “normal” people should be have at least a fundamental level of ability to write code. I think that’s a really powerful idea that is more or less an inevitability. The ability to demonstrate your particular set of skills will be important in the future, especially when basically everyone will know how to code.
I think Twilio and a few other companies have the right idea in putting the developer front and center. I hope that other organizations follow the same approach, because the people who end up getting things done will be the ones with the keyboards and a vim (or emacs, I guess) window open.
NodeConf 2013 is around the corner and shaping up to be an awesome event. One of our favorite events of the year, NodeConf is the best opportunity to hang out with and learn from some of the most active node.js contributors and community members around, all while camping out at the picturesque Walker Creek Ranch. Team Twilio will be there taking it all in, but we’d love to see you there as well.
We have a NodeConf bunk ticket (an $800 value) up for grabs and we’d like to give it away to a node.js developer who hacks something cool using Twilio’s node.js module. It can do or be anything you like, so long as it uses node.js and the Twilio module in some capacity. If you’re looking for inspiration or examples, here are a few resources to get you started: