Skip to main content
POST
Create a playback token

Authorizations

Authorization
string
header
required

Project API key. Server-side only.

Path Parameters

projectId
string
required
Pattern: ^prj_[A-Za-z0-9]+$
videoId
string
required
Pattern: ^vid_[A-Za-z0-9]+$

Body

application/json
domain
string<hostname>
required

A verified domain of the project, where the player runs.

Example:

"courses.example.com"

expiresInSeconds
integer
default:14400

Make it longer than the video so playback does not stop.

Required range: 60 <= x <= 86400

Response

Token created.

token
string
required

Opaque. Do not parse it; the format can change.

expiresAt
string<date-time>
required
embedUrl
string<uri>
required

Our player (hls.js) for an iframe on the token's domain. Shows our logo unless the plan has whiteLabel.

thumbnailUrl
string<uri>
required
playlistUrl
string<uri>

HLS master playlist for your own player (hls.js or Safari). Only on plans with whiteLabel; other plans must use embedUrl, which shows our logo. The CDN adds the token to every link inside the playlists.

Example:

"https://test-cdn.segmnt.cloud/v/vid_9xR4tL/master.m3u8?token=..."