Tropo WebAPI Development Guide Home  |  Frameset Home

  Overview  |  TOC  |  How It Works  

Creating Your First Application


Tropo's WebAPI is built around a request/response model using JSON as the data format; Tropo sends JSON to your application, your application responds with JSON instructions telling Tropo what to do, Tropo sends back results, and so on.



At the absolutely simplest level, your application can be a .json file with just the following code:

{
   "tropo":[{"say":{"value":"Guess what? http://www.phono.com/audio/troporocks.mp3"}}]
}

That app will answer a call, play a message using our Text To Speech (TTS) engine and an audio file to the caller and then disconnect. Getting this script running is just as easy - add the .json file with the above code to your webserver (or use an SSH tunnel service like Tunnlr), then follow these instructions:

1) Register for your free account at https://www.tropo.com/account/register.jsp, then check your email to retrieve your login credentials.

2) Next, login to your new account using the Username and Password provided in your confirmation email. The Account Login link is at the top right of any page of the Tropo website.

3) Once you're logged in, we'll want to create our test application. Start by clicking the "Your Applications" Quick Link:


4) Click on the link to Create New Application near the top right of the new page:


5) Click on the Tropo WebAPI icon:


6) For Tropo WebAPI Application name, enter in a name like Tropo Test.

7) For what URL powers your app, enter in the URL to the file on your webserver.


Note that this will vary depending on whether you're using a library or not, and in some cases whether you're using a framework. For example, if you're using Limonade with PHP, your URL would need to include the webserver URL, the PHP file name, and the resource name, like http://www.myserver.com/testapp.php?uri=start.

8) Click the "Create Application" button next; the page will refresh and display your new application settings.

9a) Tropo automatically assigns Skype, SIP and iNum numbers to your application to test with, as well as Tokens for launching outbound scripts, but we also want a regular phone number to test. To the right of the Skype phone number is an "Add a new phone number" link - go ahead and click on it.


9b) Select your preferred area code and then click the + sign next to the area code to add it to your application. Click the X at the top right to close the window and you'll be returned to your application settings page.


10) That's it! Give the phone number a call to test it out!


Want to use an audio file instead of Text To Speech (TTS)?

Next Step: How It Works


  ANNOTATIONS: EXISTING POSTS
0 posts - click the button below to add a note to this page

login
  Overview  |  TOC  |  How It Works  

© 2012 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site