Tropo WebAPI Development Guide Home  |  Frameset Home

TOC  |  Creating Your First Application  

Tropo Web API -
Drive our Voice, SMS, and IM cloud remotely via HTTP


The Tropo Web API is a web-service API that lets you build communications applications that run on your servers and drive the Tropo cloud using JSON over HTTP. It uses the same request-response model many web developers are already comfortable using, communicating with applications running on your own server, feeding requests and processing responses back and forth as needed.

The WebAPI is particularly useful in situations where, for example, you need to use a custom library (or libraries), or need access to a SQL database. The WebAPI allows for the deep backend integration you may need, but does, however, require you have your own infrastructure, your own hosting, and your own servers already in place.

Quickstarts


Quickstarts are fast, easy to follow examples that exemplify the ease of use and simplicity behind Tropo's functionality. They cover everything from answering incoming calls, sending text messages, mixing voice and text in an application, recording calls, creating conference calls and much, much more.

Each example will include code samples; typically, the code will include both JSON examples as well as examples written in the four most popular libraries:


There are three additional libraries available for use, though they will not be reflected in the examples:


If the example cannot be handled using JSON alone (such as an example that requires if/then/else logic, which JSON cannot do, or needs to parse data out of JSON like the response to an ask), then only library examples will be included. Many of the library examples will also include a framework; we use Sinatra with Ruby, express.js for Node.js, Limonade with PHP, itty with Python. You are not restricted to the frameworks we use - it's completely up to you. Expect these examples to potentially differ widely from each other; what works with one may not work for another.

Tutorials


Tutorials take a more in depth look at utilizing some of the core and ancillary functionality of Tropo, through the demonstration of examples built to showcase more complexity. Each of these will utilize one of the libraries, as pure JSON is significantly limited in scope.

API Reference


The nitty gritty gospel behind every Tropo example, broken down and explained piece by piece. Want to know if a parameter takes an Integer or a Float? Need to know every possible option available on record? Want to know the default timeout value for ask? This is the place to go. All the examples here will be pure JSON.



  ANNOTATIONS: EXISTING POSTS
fatboy
4/26/2012 5:19 PM (EDT)
850-509-5552
fatboy
4/26/2012 5:21 PM (EDT)
# Produces a Ruby hash:
#
# { :session =>
#  { :timestamp    => Tue Jan 19 18:27:46 -0500 2010,
#    :user_type    =>"HUMAN",
#    :initial_text => nil,
#    :account_id  =>"0",
#    :headers      => [{ "value" => "70", "key"=>"Max-Forwards" },
#                      { "value" => "385", "key"=>"Content-Length" },
#                      { "value" => "<sip:127.0.0.1:49152>", "key"=>"Contact" },
#                      { "value" => "replaces", "key"=>"Supported" },
#                      { "value" => "<sip:sample.json@localhost:5555>", "key"=>"To" },
#                      { "value" => "1 INVITE", "key"=>"CSeq" },
#                      { "value" => "SJphone-M/1.65.382f (SJ Labs)", "key"=>"User-Agent" },
#                      { "value" => "SIP/2.0/UDP 127.0.0.1:49152;branch=z9000000a9;rport=49152", "key"=>"Via" },
#                      { "value" => "3FA7C70A1DD211B286B7A583D7B46DDD0xac106207", "key"=>"Call-ID" },
#                      { "value" => "application/sdp", "key"=>"Content-Type" },
#                      { "value" => "unknown <sip:127.0.0.1:49152>;tag=750b1b1648e9c876", "key"=>"From" }],
#    :id            => "3FA7C70A1DD211B286B7A583D7B46DDD0xac106207",
#    :to            => { :network => "PSTN",
#                        :channel => "VOICE",
#                        :name    => "unknown",
#                        :id      => "sample.json"},
#    :from          => { :network => "PSTN",
#                        :channel => "VOICE",
#                        :name    => "unknown",
#                        :id      => "unknown"}}}
#
post '/start_session.json' do
  tropo_session = Tropo::Generator.parse request.env["rack.input"].read
  p tropo_session
end
voxeo_dmiranda
4/26/2012 7:34 PM (EDT)
Hello,

Did you need any assistance with anything?

Regards,

David Miranda
Customer Support Engineer
Voxeo Corporation

login
TOC  |  Creating Your First Application  

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