share_revoke

Revoke sharing of your site's object with a TubeMogul user.

Explorer

Explore this method

Request URL

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

HTTP method

POST

Arguments

email (string) - Required
This is the email of the TubeMogul user with whom you would like to share your site's inplay object.
type (string) - Required
This is the type of inplay object; it can be tracker or publisher.
id (string) - Required
This is the id of the object you would like to share.
site_id (integer) - Optional (Required if a publisher is being shared)
This is the InPlay site id of the site whose publisher you wish to share.

Returned Status Codes

0 : Unknown Error.
1 : Successful

Example Response

<?xml version="1.0" encoding="utf-8" ?>
<response stat="ok">
  <status>Success</status>
</response>

Error Codes

Standard error codes plus:

20 : the identifier requested does not belong to the specified user or the user does not have inplay permission
150 : type is invalid. Acceptable values are 'tracker' and 'publisher'
160 : no user exists with this email
170 : tracker id does not belong to the account or does not exist
180 : publisher id does not belong to the site or does not exist.

Example Code

<?
# Your user token
$user_token '';

# Your partner ID
$partner_id '';

# Your secret key
$secret_key '';

# Required email
$email  '';

# Required type - tracker or publisher
$type '';

# Required id
$id '';


$method 'share_revoke';

$now time();

$apihost 'http://www.tubemogul.com/api/v3/';

$poststring "date=".$now.
              
"&userToken=".urlencode($user_token).
              
"&partnerID=".urlencode($partner_id).
              
"&email=".urlencode($email).
              
"&type"=urlencode($type).
              
"&id"=urlencode($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='email' value='<? echo $email?>' />
<input type='hidden' name='type' value='<? echo $type?>' />
<input type='hidden' name='id' value='<? echo $id?>' />
<input type='hidden' name='method' value='<? echo $method?>' />
<input type='hidden' name='hash' value='<? echo $hash?>' />
<input type='submit' value='submit!' />
</form>