which_host

List the statistics for a video that has been launched to the video sharing sites. Returns the server address and a token that should be used to call upload_video. This method must be called before each call to upload_video.

Explorer

Explore this method

Request URL

http://api.tubemogul.com/api/v3/

HTTP method

GET or POST

Arguments

None

Example Response

<?xml version="1.0" encoding="utf-8" ?>
<response stat="ok">
   <host>api-upload-23.tubemogul.com</host>
   <token>199384072</token>
</response>

Error Codes

Standard error codes.

Example Code

<?
# Your user token
$user_token '';

# Your partner ID
$partner_id '';

# Your secret key
$secret_key '';

$method 'whichHost';

$now time();

$apihost 'http://api-upload.tubemogul.com/index.php';

$poststring "date=".$now.
              
"&userToken=".urlencode($user_token).
              
"&partnerID=".urlencode($partner_id).
              
"&method=".$method;

$hash sha1($secret_key.$poststring);

$poststring .= "&hash=".$hash;

echo 
$poststring;
?>

<br /><br />
<form action='<? echo $apihost?>' method='post'>
<input type='hidden' name='date' value='<? echo $now?>' />
<input type='hidden' name='userToken' value='<? echo $user_token?>' />
<input type='hidden' name='partnerID' value='<? echo $partner_id?>' />
<input type='hidden' name='method' value='<? echo $method?>' />
<input type='hidden' name='hash' value='<? echo $hash?>' />
<input type='submit' value='submit!' />
</form>