TubeMogul - Analytics for Online Video

Sign Up | My Account | Log in
Dashboard
Learn More
Research
Help

Intro

The TubeMogul API allows developers to create customized applications that leverage the distribution and analytics capabilities available on the TubeMogul Web site.

TubeMogul's API is currently restricted to partners and paid customers (with some exceptions). To gain access, please contact us using this form.

Getting Started

We recommend the following for getting started with the TubeMogul API...

  1. Request your API token and secret key. Click here.
  2. Read this: Authenticating -- An overview of the API authentication model.
  3. Watch this Getting Started video:
  4. Using your tokens, try out a few methods using our API Explorer.
  5. Download and run our PHP reference app.
  6. Start coding.

API Format

Unless otherwise noted, all API calls should be implemented using HTTP GET. The content-type of the video.upload method should be multipart/form-data in order to upload a binary file and the content-type for all other methods should be application/x-www-form-urlencoded. The responses will all be returned in a UTF-8 encoded XML file.

The endpoint URL of the API is:
http://api.tubemogul.com/api/v3/

Required Global Arguments

The arguments listed below are required for every API method call, in addition to any arguments that are specific to the method:

method (string)
The name of the method being called.
date (integer)
A UNIX timestamp displaying the number of seconds elapsed since January 1st, 1970 (UTC).
auth (string)
A SHA-1 hash that concatenates the query string with the partner's secret key (See Authenticating dor details.)
user_id (string)
Your user id obtained from TubeMogul. (See Authenticating for details.)
Partners only: note that user_id is unnecessary with a partner_id/user_token combo. See Partner Authentication for details.

API Standard Error Codes

Successful queries will result in a reponse status="ok". Unsuccessful queries will result in status="fail". (Note that for legacy support, the API also returns stat="error" and stat="ok". Please use the status attribute.) All methods can return the following status codes, in addition to per-method errors:

  • 90 - The request was malformed (or the video file may be too large).
  • 93 - Invalid authentication hash.
  • 94 - Specified date is more than 30 minutes old or is greater than the current time.
  • 95 - Unconfirmed userToken.
  • 96 - Invalid userToken.
  • 97 - Invalid method.
  • 98 - The partnerID has exceeded its API usage limit.
  • 99 - Invalid partnerID.
  • 999 - An unexpected error occurred.

Resources