create a token

v1
post
/1/vod/channel/{channel}/share/{share}/token

take care to add https://player.vod2.infomaniak.com and https://api.vod2.infomaniak.com when using allowed_domains along when using infomaniak player

Path parameters

channel
requiredstring
Examples:example
share
requiredstring
Examples:example

Body Parameters

application/json
strategystring
Possible values:DASHHLSBESTSINGLE

Array

Examples:HLS
start_timestring

default NOW

Examples:NOW()
end_timestring

default NOW

Examples:NOW()
windownumber
Min:1

secondes

Examples:127
allowed_domainsarray

array

Examples:["https://player.vod2.infomaniak.com","https://api.vod2.infomaniak.com","https://yourdomain.ch"]
restricted_domainsarray

array

Examples:[url1,url2]

Response Body

application/json
resultstring
Examples:success
data

Example request

                <?php
use GuzzleHttp\Client;

$client = new Client();
$headers = [
	'Authorization' => 'Bearer YOUR-TOKEN-HERE',
	'Content-Type' => 'application/json'
];

$body = '{}';

$request = new Request('POST', 'https://api.infomaniak.com/1/vod/channel/{channel}/share/{share}/token', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
            

Example response

application/json
                
                    
{
"result":"success"
}