Getting Started

Getting started with Tout is easy, but there are a few basics we should cover. First of all, what is Tout? Tout is a real-time video information network that is helping to usher in the visual web. We enable real-time information distribution as well as asychronous video conversations.

The Tout mobile applications as well as the widgets consume the API, meaning everything you can do on Tout you can do through the API. You can enable users to easily create video and we'll handle the transport, storage, encoding and playback delivery for you. Or you can easily pull in videos from some our premium partners or all videos tagged with a particular hashtag.

TL,DR;

Tout is a (mostly) RESTful video API that utilizes OAuth2.0, accepting requests over HTTPS and returning JSON responses.

Registration Day

In order to get going with Tout, you're going to need a few things:

  1. a Tout account - you can register back at Tout.com
  2. a registered application - once you have a Tout account, you can register an app right here

Authenticating

There are a few different authorization workflows to understand about OAuth2.0. In general, here is what you need to know about OAuth2.0:

  • The goal of OAuth, in general, is to allow access to protected resources without requiring a user to divulge their username/password combination. There are many reasons to avoid asking your user for their username/password combo, but suffice to say you simply don't want to be responsible for any potential breaches.
  • It achieves this goal by having the user authenticate with the service where the resource is hosted and returns a token representing that user to your service.

We recommend refreshing a bit on the supported authorization workflows before continuing on, but if you're totally comfortable with authenticating your app and/or user with OAuth2.0 please proceed.

Making some sample requests

Let's assume you want to pull all of @Gardner's Touts so that you can display them on a wall. Great, well we already have all of the information we'll need:

  • an access_token from the authorization workflow
  • the username for whom we want to retrieve all of the Touts (in this case, @Gardner)

We'll simply make a GET request to https://api.tout.com/api/v1/users/gardner/touts and we'll make sure to at least pass along the access_token parameter in the URL string. Since @Gardner is simply too prolific of a Touter, let's also pass in per_page=1 as a URL query parameter so that we don't have to handle all of his Touts. Keep in mind, since we haven't authenticated as @Gardner, the Touts that will be returned are just his public Touts. If you had an access_token representing @Gardner, the collection would also include his private Touts.

Enough talk, let's see what is returned:

You'll notice that the Tout, though alone, is returned within an array. This so that it is easy to iterate through the returned collection of Touts. If we had tried to pull all 2500+ of @Gardner's Touts, this easy iteration would have been essential.

Go forth, and build something awesome :)

Take your keys, your new-found OAuth2.0 knowledge and your ideas and build something your users will love. These interactive docs will be of tremendous help as you navigate through the Tout API. And of course, make sure to let us know what you build!

© Tout
documentation made with I/O Docs