Posts Tagged ‘API’

Tropo Teams with Apigee on API Explorer

Friday, January 27th, 2012

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.

Dial and SMS your APIs with Tropo

Thursday, December 22nd, 2011

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.

Install the Tropo WebAPI and Mikeal Rogers’ Request NPM modules:

npm install tropo-webapi -g
npm install request -g

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.

Customer Spotlight: Zapier

Friday, December 16th, 2011

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:

Tropo Brings the Gold to LoneStar Ruby Conf

Thursday, July 28th, 2011

Tropo is proud to pony up the gold to sponsor the famous LoneStar Ruby Conference in Austin, Texas August 11-13, 2011!  This year marks the conference’s 5th anniversary and we are planning to make it a special one to remember.

The keynote speakers include:

James Edward Gray II

Obie Fernandez

Chad Fowler

We’ll be participating in Thursday night’s API hack night and will be providing prizes for the coolest Tropo, Phono, or SMSified application!  Start thinking and planning out your strategy now for this event and stay tuned to our Twitter feed for more information as we get closer to the conference!

See y’all there!

Empire Avenue Stock Quotes by SMS

Tuesday, April 26th, 2011

Have you heard of EmpireAvenue? According to their website, “Empire Avenue is the Social Media Exchange, where you can buy and sell shares in any social media profile, meet new people, unlock Achievement badges, and earn boatloads of virtual cash by being active and social online! Buy shares in your friends, your followers, people with similar interests, brands you love, celebrities – anyone! All using a virtual currency and all for free!”

Cas Hoefman, a long time telephony geek and friend of Tropo, built an SMS hook into their API!

If you want to see a working sample just send a text message with DISRUPTIVE to (818) 900-2731 to get back our latest stock price or replace DISRUPTIVE with your own Empire Avenue Ticker Symbol to get your own latest stock price!  You can also scan the QR code on the left and we’ll do it for you.

Using Tropo, you can add SMS to virtually API to further extend services to meet your needs.  For more details on Cas’ application including the source code, please visit his blog post!

Meet Tropo in Chicago at Drupalcon

Thursday, March 3rd, 2011

Are you a Drupaler? Tropo’s going to be at Drupalcon next week in Chicago and would love to meet with you.

We’re sponsoring Drupalcon’s module developer contest and hitting up some sessions while we’re there.

Module Contest

Are you a kick-ass module developer? Got an idea that you’ve been itching to build? New this year at Drupalcon is the module creation contest. Monday at lunch you’ll learn the contest theme and then have 24 hours to create something awesome. It’s like Iron Chef for Drupal modules.

Your modules will be judged by a panel of Drupal experts and a rockstar. No really. An actual rockstar, Morten Dk, is judging, along with Drupal luminaries Robert Douglass and Jeff Eaton.

What do you win?

  • 1st Place – Apple iPad and $200 Tropo Credit
  • 2nd Place – Amazon Kindle and $100 Tropo Credit
  • 3rd Place – Apple iPod Shuffle and $50 Tropo Credit

Full contest rules should be up on the Drupalcon site soon.

Drupal Modules for Tropo

We’ve recently released a couple of Drupal modules for Tropo for your hacking pleasure. Send out content notifications or turn SMS messages into nodes with the Tropo Drupal SMS Framework plugin. It comes with an optional patch to SMS Framework that lets you use Tropo’s multichannel capabilities and do IM and voice with Drupal, too.

Drupal comes with a built-in polling system, and you can turn polls into mobile apps using Phone Poll, the Drupal module that adds voice and SMS voting to Drupal polls.

And while not yet released (although it’s on Github), the Tropo module for Drupal is a developer framework that makes the entire Tropo API available from within Drupal. Launch calls, create applications, add phone numbers, and even serve a Tropo application from within Drupal.

And while not Tropo related, we released Passkey last week. Passkey handles all the heavy lifting of replacing Drupal logins with external authentication. Write one function and log into Drupal with an external user store. We’re using it internally in Tropo HQ and hope you find it useful on your own sites.

Sessions

With all the speaking we’ve been doing recently, our vocal cords are falling off. We’re sitting this one out, and we’re planning on attending a lot of great sessions and soaking up some learning instead.

Some of our favorites are “Drupal as a Framework” vs. “Drupal as a Platform”, Drupal Security for Coders, and Introducing OpenPublic: the Government Drupal Distribution!. We’ll probably hit up Coder Module: Easily Port Modules to Drupal 7 because we’ve got to get our own modules ready for D7, too.

New at Tropo: SSL and REST APIs for provisioning & remote control

Monday, December 20th, 2010

Some of the most-requested features for Tropo have arrived. APIs to manage applications, add and remove numbers, and remotely control a running Tropo session are now available. If I were a cliched hack, I’d call this a Christmas gift for Tropo users. But I’m not, so I won’t. 

Provisioning – For managing applications, Tropo has a set of new REST APIs that allow you to do with code anything you can do with the Tropo UI. Create applications, add and remove phone numbers, fetch all the contact methods for your application, change URLs. If you’ve set up billing information, you can even move applications to production. All from your code. Even some things you can’t do in the UI can be done from the API (like moving a number between apps or switching an app from Scripting to WebAPI).

Read more…

Remote Control – A common request is to allow a developer to break a caller out of a conference call, stop hold music, or cancel some long-running operation. Our new event API allows you to send an “exit” signal to any running session and have it interrupt any Tropo function. You can even target that signal at a specific piece of code, useful if you have 10 different say() functions in your app, but only want to stop the one that’s playing hold music.

The event API is available on the servers powering the free development applications now and will be promoted to production applications in about two weeks.

Read more…

These two new APIs are added to the REST API we already offered for launching new sessions and the RESTful WebAPI for running a Tropo application over HTTP. And we’re not done. Look for more RESTful interaction with your Tropo applications soon.  Check out the Full REST documentation for more info.

SSL – All APIs are now available over SSL and all examples are being updated to show https urls. Using non-SSL encrypted connections will continue to be available, but we strongly encourage that all API calls be made over SSL. We’ve also added SSL certificates to our WebDAV servers, allowing you to securely update application code over WebDAV.

In addition to these new features, Tropo still offers:

  • Free developer accounts – Try out Tropo without adding a credit card or keeping track of limited developer credits. Tropo is free for developer usage, including phone numbers around the world.
  • 24×7 Support – Our support team is available around the clock if you have any questions while working on your application.
  • Worldwide Platform – Phone numbers in 41 countries. Voice recognition and text to speech in 9 languages. Calls and SMS to anywhere in the world. International telephony is hard. We make it easy.
  • Skype, SIP, iNum, XMPP, and more – Tropo’s way more than just phone numbers. Send text messages, interact over IM, call into your app with Skype or SIP. We provide you with multiple communications channels and the tools to use them.

So get cracking. Build something great with Tropo. We can’t want to see what you do. Don’t have an account? Sign up free.

Tutorial: Click-to-Call applications (w/ conferencing)

Saturday, April 24th, 2010

Hello,

A great use of Token initiated calls, or calls initiated via HTTP request, are click to call applications. This is when you have a fancy button on your website and can have your customers simply ‘click to call’ your call center. This allows them to get right to the people they need quickly and effectively, but how do you do it? Well over here at the ‘Halls of Justice’, sorry I mean Tropo Support we get this a lot. This being the case I have gone ahead and put together a nice example to show you just how to put a click to call application together!

So before we start I need to make one thing clear, Scripting is top down execution, or the fancy word is synchronous. This means task 2 can’t start until task 1 is complete, but to get around this we will make use of threads, providing our language of choice supports it. In Ruby this is pretty simple, and other markups may allow for threading, but that is a whole another discussion. In this example it’s Ruby and we are using with threads, just go with it =):

So, in order to start a new thread you just need a call to Thread.new. A new thread will be created to execute the code inside the thread block, then the original thread will return from Thread.new right away and continue with the next statement

# Thread #1 is running here
 Thread.new
  # Thread #2 runs this code
 end
# Thread #1 runs this code

If you want to read up on this more there is a great tutorial I have linked here which you should check out.

Now this whole posting is predicated on the fact that you do know how to do a token call, so if you don’t please take a quick look at the Tropo Session API (Token Initiation ) documentation. You can find this here in our documentation so please give it a read if you have not already.

In this example we are going to base our code on a code snippet provided in that section of our documentation:

call('tel:+1' + $numberToDial, {
  :onAnswer => lambda { |event|
    say("Hello " + $customerName + ", " + $message);
    log("Contacted customer: " + $numberToDial);
    hangup()
  }}
)

So this example will call someone, and it will play a message, but that is only going to get us halfway there I am afraid; The reason is we not only need to call our user (customer) we also need to call our call center. Once have them both on the line we then need to get them to talk to each other using a conference. Since as I mentioned Ruby is executed top down we’ll need to use threads in order to achieve this goal. Yea, it may sound complicated, but in actuality it’s bark is much worse then it’s bite; Lets take a look at the finished example below:

#Define Global Options
operatorNumber = "4074181800"
applicationCallerID = "8008675309"

#Method to create timeStamp as our conferenceID
	def get_conference_id()
		timeVar  = Time.new
		returnValue = timeVar.strftime("%Y%H%M%S")
		return returnValue
	end

	conferenceOptions={
				:mute=>false,
				:playTones=>true,
				:leaveprompt=>"beep"
				}

begin

#Create conference ID
 conferenceID = get_conference_id()

#Call First Leg (User)
	call 'tel:+1'+$numberToCall, {
	        :callerID => applicationCallerID,
	        :onAnswer => lambda{|event|
			log "@"*5 + "User has answered"
			#Create second thread for second leg (Operator)
			Thread.new do
				log "@"*5 + "Start second tread"
					call 'tel:+1'+operatorNumber, {
						:callerID=>applicationCallerID,
						:onAnswer=>lambda{|event|
							log "@"*5+"Operator answered join conference"
							newCall = event.value
							#announce caller
							newCall.say("You have a call from " + $callerName)
							#join operator to conference
							newCall.conference(conferenceID,conferenceOptions)
						}
					}
			end

			newCall = event.value
			# prompt user
			newCall.say("Please hold while we connect you")
			newCall.conference(conferenceID,conferenceOptions)
		}
	}
end

The only thing really not covered here is the fact that you need to have a conference to join the callers, and since we are using threads we need to make sure each one joins the right conference. This is done with the conference ID, and in my example we are going to use a time stamp, called from a method, as our conferenceID.

#Method to create timeStamp as our conferenceID
	def get_conference_id()
		timeVar  = Time.new
		returnValue = timeVar.strftime("%Y%H%M%S")
		return returnValue
	end

So I think this part is pretty simple, and I don’t think going in to much more then a ‘hey look at that, it’s that thing you like’ type of explanation is really needed here; Of course if I am wrong please comment below, or contact our support team, and we would be glad to offer more clarification.

So as a whole you can see the script is pretty simple, we just fire off an HTTP request to the session API which can be done by a form on our website (obviously you need to change the values highlighted here):

<form action="http://api.tropo.com/1.0/sessions" method="get" accept-charset="utf-8">
	<input type="text" name="numberToCall" value="4075551212"/><br>
	<input type="text" name="callerName" value="John"/><br>
	<input type="hidden" name="token" value="token_id_goes_here"/>
	<input type="hidden" name="action" value="create"/>
	<p><input type="submit" value="Continue &rarr;"></p>
</form>

Of if you want you can also use CURL as well:

curl -I "http://api.tropo.com/1.0/sessions?action=create&token=my_token_id_goes_here&numberToCall=4075551212&callerName=john"

You can even get real fancy and build an XML payload which you can then post to the sessions API (curl -d @token.xml “http://api.tropo.com/1.0/sessions”)

<session>
 <token>my_token_id_goes_here</token>
 <var name="callerName" value="John"/>
 <var name="numberToCall" value="4075551212"/>
</session>

Once we caller 1 has answered we do a Thread.new and call caller two, and then as mentioned above Thread.new instantly returns us the the first thread and then we join caller 1 to the conference. Then once caller two answers we announce caller 1′s name and join him to the waiting conference participant, pretty simple huh?

Well I really do hope this is helpful, and if there are any questions on any of this please let us know!

Regards,

John Dyer
Customer Engineer
Voxeo Support

Tropo Adds Twitter and goes International

Thursday, March 25th, 2010

Tropo is all about making it easy for you to interact with your customers. What if you could write one application and communicate with your customers via voice, instant messaging (IM), text message (SMS) and even Twitter? And what if they could call that application from anywhere in the world and talk with it in their own language?

Welcome to the new Tropo.com release today!

Tropo was already the easiest way to build voice-powered phone applications. Today, the Tropo cloud communications platform goes into full production launch with a suite of new features including:

  • TWITTER SUPPORT – You can now assign a Twitter name to your application and customers can interact with the app by simply sending a Twitter message to that name. Your app will see all messages to the Twitter account and can take action on messages that are received. Want to set up an app to do customer support over Twitter? Want to make your web application be able to service Twitter users? Now you can. Simple and easy and all secured by OAuth, too. Read more:
  • INTERNATIONAL PHONE NUMBERS – No longer are Tropo phone numbers limited to North America. Now for a low monthly fee you can get numbers in over 30 countries: Austria, Belgium, Brazil, Croatia, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Ireland, Israel, Japan, Latvia, Lithuania, Luxembourg, Malta, Mexico, Netherlands, New Zealand, Norway, Panama, Peru, Poland, Portugal, Slovakia, Slovenia, Spain, Switzerland and the United Kingdom.
  • INTERNATIONAL OUTBOUND DIALING – Naturally if you can accept inbound calls from other countries you can also make outbound calls to virtually any country around the world. Making international calls? Ask us for our international rates.
  • INTERNATIONAL TEXT-TO-SPEECH – All those fancy new international numbers deserves some fancy new language support, too. A simple flag in your code lets you change the voice used for text-to-speech to any of these languages: US English, UK English, Dutch, French, German, Italian, Mexican Spanish or Castilian Spanish. Read more:
  • INTERNATIONAL SPEECH RECOGNITION – Tropo.com has always supported automatic speech recognition (ASR) in English so that you can have your callers talk back to your app instead of having to punch their touchtone responses in… now we’ve added ASR support for more languages: UK English, Dutch, French, German, Italian, Mexican Spanish or Castilian Spanish.
  • SMS SUPPORT – Does your app have a US number? The exact same phone number you use to call your app can also be used to receive and reply to SMS messages. Want to broadcast an announcement or send a user some alerts? Your app can send SMS messages, too. Connect the millions of mobile users to your application now. It’s the same API as your voice application, so you don’t need to write two different apps. Read more:
  • IM and CHAT SUPPORT – You can add instant messaging accounts to your app and communicate via AOL’s AIM, Yahoo!Messenger, Microsoft’s Live Messenger, GoogleTalk or any XMPP or Jabber IM service. We’ll even give you a nifty “tropo.im” Jabber ID for your app. Like SMS, IM uses the same API as your voice apps. No extra coding required.
  • TOLL-FREE PHONE NUMBERS – Want to make your app accessible to everyone in North America at no cost to them? Add a toll-free number. And because you shouldn’t have to pay extra just to provide your customers with more convenience, calls to toll free numbers are priced the same as local numbers.
  • NEW REST/JSON WEB API – Beyond the hosted scripting Tropo has always offered, you can now host your application on your own web server, write it in whatever language you choose and communicate through our RESTful web API using JSON. Read more:
  • ONE-CLICK MOVE TO PRODUCTION – After you have developed your app and want it to go live, it’s just one click in the web interface to move it into production. No contracts, no calls into a salesperson. Simply go into the web management interface and flip the switch. That’s it.

Beyond the new features, Tropo continues to offer the following:

  • FREE DEVELOPER ACCOUNTS – No need to provide a credit card. No need to purchase credits just to try out your apps. We let you sign up completely for free… get free North American phone numbers, free outbound calling, free support… Just head over to Tropo.com to sign up now.
  • SKYPE, SIP and INUM NUMBERS – We know that the world of voice calling is moving beyond the legacy Public Switched Telephone Network (PSTN). When you create an app on Tropo, you immediately get (at no extra charge) a Skype number, a SIP address and an iNum number to let people call your app from all those newer networks, too.
  • FREE DEVELOPER SUPPORT – We don’t call our support team the “Customer Obsession Team” for nothing… they are obsessed with making sure you get the information you need to make your apps successful and they’re doing it around the clock.
  • TROPO SCRIPTING – If you don’t want to host your application on your own web server you can easily host it on our cloud in Ruby, JavaScript, Python, PHP or Groovy.
  • VOXEO’S REAL-TIME CLOUD INFRASTRUCTURE – Tropo.com runs on top of Voxeo’s worldwide cloud infrastructure that is optimized for real-time communications and will ensure your calls and messages go through.

We’re very excited that Tropo has gone live and we’re looking forward to seeing what you all do with it. Why not start now? Head over to Tropo.com and create an account. Or, if you are an existing user, login and check out all the new features you can add to all your existing applications.