Tropo is excited to partner with Apigee on the Tropo API Explorer! The API Explorer allows more developers to explore, learn, and test Tropo’s cloud communications APIs faster than ever before.
Tropo provides an API and cloud communications platform for building powerful Voice applications with speech recognition and text-to-speech in 24 languages, call recording, conferencing, SIP/VoIP, and phone numbers in 41 countries. Tropo also provides international SMS services.
The API Explorer makes this integration easier, helping developers authenticate and test our API in seconds, view the full surface area of an API, view request/response pairs in only a few clicks and share what they are seeing with others.
Now you can use the Apigee API explorer to experiment with our REST API without writing a single line of code! It is built with Apigee To-Go, a free product to let users build, skin and embed their own API Console. The Tropo API Explorer is embedded below or you can jump to this full screen version.
The number of APIs available are increasing by the day and so is the popularity of Node.JS, the server-side event-driven javascript framework. This got me thinking… How cool would it be to be able to call or sms an API with your phone using Node.JS?
This is a pretty simple thing to do with Tropo and Nodester. Tropo has an NPM module available for adding Voice, SMS, and Instant Messaging to Node.JS applications and Nodester has REST APIs available to report on the status of the platform. 25 lines of Node.JS code later, we now have an Node.JS application using the Tropo API to dial and sms the API to retrieve the status of the platform.
Here’s the phone number: (480) 428-8723 to call or SMS.
Run this code on localhost or deploy it to a Node.JS hosting service like Nodester.
var http = require('http');
var tropowebapi = require('tropo-webapi');
var request = require('request');
http.createServer(function (req, res) {
// Create a new instance of the TropoWebAPI object.
var tropo = new tropowebapi.TropoWebAPI();
// Fetch Nodester status -> http://api.nodester.com/status
// returns {"status":"up","appshosted":2878,"appsrunning":1759}
request('http://api.nodester.com/status', function (error, response, body) {
if (!error && response.statusCode == 200) {
// console.log(body) // Print status
var statusreq = JSON.parse(body);
tropo.say('nodester is ' + statusreq["status"] + ' and hosting ' + statusreq["appshosted"] + ' applications with '+ statusreq["appsrunning"] + ' running at the moment ');
res.writeHead(200, {'Content-Type': 'application/json'});
res.end(tropowebapi.TropoJSON(tropo));
}
})
}).listen(13151);
One of the really cool things about the Tropo API is that you can write your app one time and it automatically runs on multiple communications channels such as: Voice, SMS, and Instant Message.
We all agree that texting while driving is very dangerous, right? Fred Wilson, VC and principal of Union Square Ventures thinks so too. He recently wrote a blog post that starts like this:
“As a parent of two young adult drivers and a third soon to hit the road, nothing scares me more than texting while driving.”
Fred continued his blog post envisioning a Voice Texting application as follows:
“Being an engineer at heart and by training, I’ve been looking for a solution to the problem. I know that the buzz of the phone and the unread/unresponded message is like a drug to many and that the best solution would be a “hands free” way to read and respond. And the bluetooth/hands free voice solution works so well on most cars and most phones now, so why can’t we do the same with texting?”
Having two kids of my own (1 already driving and 1 studying for a drivers permit) and having access to the Tropo API and platform, I felt compelled to build a quick Voice Texting application to share with Fred Wilson! Here is what Fred had to say upon me sharing it with him…
Here is how it works:
To send a text, call (415) 349-3120 and using Tropo speech recognition say the phone number that you would like to text and then speak your message. Tropo then transcribes the message and sends your text message to phone number you spoke without taking your eyes or hands off the road.
Disclaimer: We are not promoting texting while driving even with the proper tools that would keep your eyes on the road such as a bluetooth earpiece and autodial features.
The source code for this project is written in Ruby and open sourced on GitHub in case anyone would like to extend it or perhaps even create a new business around this idea and have a head start! Here’s a video of me demonstrating the technology in action:
ScraperWiki is a powerful cloud-based service that lets you scrape data from online documents and websites.
When you write a scraper – a script to pull information from a web resource and then parse out the bits you want – it will execute inside the ScraperWiki environment.
You can store the data that is scraped inside a data store and then access the data from outside the ScraperWiki environment using their API. Scrapers can be written in one of several different languages – Ruby, PHP and Python.
ScraperWiki and Tropo operate in a very similar way. The Tropo scripting environment allows you to write scripts in one of several different languages, including Ruby, PHP and Python (Groovy and JavaScript are also supported).
Your script executes inside the Tropo environment, which means you can make direct connections to external resources – like the ScraperWiki API – from within your executing script. There is no need for extra HTTP overhead, and the additional step of posting to a back end server to connect to other APIs or resources.
In the following screencast, I demonstrate how to use Tropo and ScraperWiki to quickly and easily build an airport information system for the Philadelphia International Airport.
All of the code for this example can be found here. If you’d like to view the actual scraper I wrote on ScraperWiki, you can find it here.
This is still a work in progress – I’d like to run this script multiple times per day (ideally, maybe once an hour) to get updates to flight information and ensure that the app has the most up to date flight status. The voice dialog could also use a little tweaking, and I’d like to offer the option of repeating the information.
But even with these refinements aside, it is evident how combining these two powerful cloud resources can generate a pretty useful application in a very short time.
Tropo and ScraperWiki are a powerful combination. Happy flying!
We are excited to feature Zapier on this week’s Tropo Customer Spotlight! Today I sat down with Wade Foster, one of the co-founders of Zapier, to discuss their business and learn more about how they are using Tropo for their Instant Messaging services.
What is Zapier?
Zapier allows you to “zap your apps!” You can build unique integrations between your favorite applications, one mouse click at a time without writing a single line of code!
Own Your Data: Zapier makes it easy to import and export data automagically with your favorite web apps. Don’t get locked in.
No Data Entry: Quit filling out the same information between different applications, and let Zapier do the heavy lifting for you.
Fill-in Missing Features: Never be at the mercy of vendors to build features or integrations. Use Zapier to add missing functionality.
Zapier uses Python, Django, and the Tropo Scripting API to deliver Instant Messaging services to users on AIM, GTalk, MSN, and Yahoo!
To learn more about Zapier, visit their website at http://zapier.com!
Here is a screencast of Zapier using Tropo for their Instant Messaging services:
Yesterday, at the Andreessen Horowitz Offices in Silicon Valley, FCC Chairman Julius Genachowski announced the winners of the Apps for Communities challenge.
The challenge, a several months-long call to developers to build apps that connect people to their communities, culminated with the submission of 75 innovative applications. The idea behind the challenge, which was sponsored by The Knight Foundation and the FCC, was as follows:
“Using hyper-local government and other public data [entrants] should develop an app that enables Americans to benefit from broadband communications — regardless of geography, race, economic status, disability, residence on Tribal land, or degree of digital or English literacy — by providing easy access to relevant content.”
When the winners were announced, three inspiring, innovative applications built with Tropo and SMSified were among the winners, including the Grand Prize winner.
Here is a quick summary of the winning entries that used our platforms:
YAKB.us (Grand Prize Winner)
YAKB.us is a realtime bus notification service that provides information via phone and SMS. The service, which is available in both English and Spanish, provides transit information in three municipalites – Arlington County VA, Charlottesville VA and Santa Clarita CA. This innovative application was built by Code for America fellow Ryan Resella.
PhillySNAP (Honorable Mention)
PhillySNAP makes it easy to get information on retailers in Philadelphia that provide reimbursement for Supplemental Nutrition Assistance Program (SNAP) benefits. The service allows users to send an SMS message with their address and then it provides the addresses of retailers near them where they can use their benefits. This application was initially developed at the Random Hacks of Kindness hackathon in Philadelphia this past June.
PhillySNAP was also featured on the SMSified blog several weeks ago.
Off to Market (Bonus: English Literacy)
Off to Market is another SMS-based app that provides the locations of farmers markets, where users can go to find fresh produce. It’s written in Node.js and uses the Tropo WebAPI. The developer – another Code for America alum, John Mertens – wrote a fantastic post on his blog about how he obtained, refined and staged the farmer’s market data for this app.
Congratulations to everyone who participated in this outstanding challenge, and congratulations to all of the great apps that were honored as winners!
Tim Strimple joined us at the LA Holiday Hackathon to get in on the competition of building Tropo applications for prizes and won a $50 Tropo Production credit for his Tropo SMS and Wolfram Alpha mashup!
You can ask the application virtually any question via SMS using the following phone number 661-206-2681 and it responds to your inquiry via SMS using Wolfram Alpha’s search results. Here’s a video of Tim demonstrating his application in action!
Here’s the code behind Tim’s Tropo SMS Wolfram Alpha mashup! It’s written in PHP and uses the Tropo Scripting API.
<?php
function CheckForShortcut($request)
{
if(stripos($request, "siri") !== false)
{
return "I don't like to talk about her.";
}
if(stripos($request, "remind") !== false)
{
return "I am not your personal assistant.";
}
if(stripos($request, "tropo") !== false)
{
return "Tropo is great, I love it!";
}
return false;
}
function ParseResponse($response)
{
// Replace with real XML parsing
$min = strpos($response, "</plaintext>");
$startPos = strpos($response, "<plaintext>", $min) + 11;
$endPos = strpos($response, "</plaintext>", $startPos);
$length = $endPos - $startPos;
if($min > 0)
{
return substr($response, $startPos, $length);
}
else
{
return "Go ask Siri...";
}
}
function GetResults($request)
{
$shortcut = CheckForShortcut($request);
if($shortcut)
{
return $shortcut;
}
$request = str_replace (" ", "%20",$request);
$wolframApiKey = "XXXXXX-XXXXXXXXXX";
$url = "http://api.wolframalpha.com/v2/query?appid=" . $wolframApiKey . "&input=" . $request;
$response = file_get_contents($url);
return ParseResponse($response);
}
if($currentCall->channel == "TEXT")
{
$result = GetResults($currentCall->initialText);
say($result);
}
else
{
say("I do not support voice currently. Try sending me a text message instead.");
}
?>
Approximately 30 Los Angeles .NET, Ruby, PHP, and Javascript developers attended this Saturday’s LA Holiday Hackathon at Outlook Amusements sponsored by RightNow Technologies and Tropo. The theme of the event consisted of building a Voice, SMS, or Instant Messaging holiday application based on the Tropo Scripting or Web API. Here is a photo of everyone hard at work hacking on their holiday Tropo application.
I love the sound of phones ringing in the morning! By noon, the applications were starting to take shape with some definite front runners in the competition. In addition to Tropo APIs, many of the teams also used Phono, SMSified, RightNow, Wolfram Alpha, and Google’s Shopping APIs to deliver their new applications.
Here are the winners of the LA Holiday Hackathon listed in order:
First place goes to Gift Finder winning an iPad2 compliments of RightNow Technologies. This application allows the user to enter a phone number, name, and email address to place an outbound call to someone to recommend gifts for loved ones. Speech recognition was used to ask the user for their zip code, gender, price range range, and category of the gift. The application uses the Google Shopping API to find gifts in their area for the gender and age of the recipient and reads them off one by one using text to speech. This application was built using Ruby and Sinatra and hosted on Heroku as well as using the Javascript Tropo Scripting API.
Second place goes to Santa’s Book winning a Kindle Fire compliments of RightNow Technologies. This application asks for two phone numbers and starts by calling the first number to ask a series of five questions using speech recognition to determine if the person is naughty or nice along with asking them to record the present that they would like to receive. The application proceeds to call the second number to relay the naughty/nice determination and playback their gift recording. The application also sends an SMS text message to the second number with the naughty/nice determination along with the transcribed gift request. This application also used RightNow’s CRM API to log the call and data related to the surveys. This application was built using PHP and the Tropo WebAPI along with RightNow’s CRM API.
Third place goes to Santa Hack winning a $75 Fry’s Electronics gift card compliments of Outlook Amusements. This application used Phono and Tropo to schedule and bridge appointments to speak with Santa. This application was built using C# and the Tropo WebAPI.
Fourth place goes to Tropo WA (Wolfram Alpha) winning a $50 Tropo production credit. This application was a Wolfram Alpha and Tropo SMS mashup written in PHP using the Tropo Scripting API. You can ask the application various questions via SMS on the following number 661-206-2681.
Ushahidi is a platform for crowdsourcing information. Members of the public submit reports that are geo-located and then put on a map. The platform is used in disaster relief, election monitoring and just about any other situation where people need to learn things from one another quickly and concisely. Out of the box, Ushahidi allows people to submit reports via the web, mobile applications, Twitter, Facebook with support for a few SMS APIs as well.
We have created an easy-to-use application that lets people use Tropo to input data into Ushahidi via SMS. We’ve put the code up on Github and you’re welcome to submit pull requests if you find bugs or add features.
To use the code, you don’t have to install anything on Ushahidi. Here are the steps:
In Ushahidi, create a user with “Admin” privileges.
check out the code from Github
edit the configuration lines at the top with your Ushahidi credentials and URL
create a new Scripting API Application on Tropo.com.
Once your Tropo app is created, you can add an SMS-enabled number (US and Canada currently) and optionally configure it to talk on any IM networks or Twitter.
Now, when you send a message to any of your configured numbers the application will attempt to geo-locate the message based on its contents. The app then submits a report via the Ushahidi API in an unverified state. Admins of the site can then verify the reports and publish them to the web.
In our example here, we simulated a flood in Milwaukee. The instance pulls in feeds from local media and disaster response community, accepts reports via the web and accepts reports from a Tropo app I created. We sent a message to the number configured in the app with the following content:
Columbia St. Mary’s Hospital Milwaukee WI is flooded. Power is out.
This was submitted to Ushahidi in an unverified state. The reviewer then added text to flush out the report based on other incoming data and then published the report:
This sort of crowdsourced data, gathered at the source, is valuable for many reasons. It gets the word to responders and the public more quickly so that people can act appropriately (e.g. by not going to that hospital, go to another one.) First responders become aware of the weight of a problem when more people report the same thing or when the first report comes in of a very big event.
Watervoices.ca, developed this past weekend at RHoK, will be going live with this application soon and we hope to see others using it to help the world soon. Over time, we will be adding support for Voice, PhoneGap within Ushahidi and many other features.
The theme of the LA Hackathon is “Build Voice/SMS apps for Holidays”! Here are a few ideas to get you thinking:
Santa Caller (similar to http://santacall.us) – Build a website that allows a parent to schedule a call to their kids from Santa. Have Santa ask the kid what they would like for Christmas and then email the parents their kid’s recorded message and/or transcribe the message for the email.
Holiday Greetings Hotline – Build a holiday greetings hot line where user can leave a voice message that will be transcribed into text and posted to “Holiday Greetings” twitter account.
Even though this event is sponsored by the .NET Developers Group, we will be supporting all development languages and will have Tropo expertise onsite in .NET, PHP, Ruby/Rails, and Javascript, and Node.JS!