Exchange a playback session for a protection entitlement
POST
/v1/drm/entitlement
const url = 'https://drm.wirevod.online/v1/drm/entitlement';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://drm.wirevod.online/v1/drm/entitlement \ --header 'Authorization: Bearer <token>'Exchanges a playback session token (sent as a bearer credential) for a
short-lived entitlement. Attach every header in license_headers, unchanged,
to licence requests sent to the license_url of the key system in use.
Authorizations
Section titled “Authorizations”Responses
Section titled “ Responses ”Entitlement with licence headers and key-system endpoints.
Media typeapplication/json
object
expires_at
required
integer
license_headers
required
object
key
additional properties
string
key_systems
required
object
key
additional properties
object
license_url
required
string format: uri
certificate_url
string format: uri
Example
{ "expires_at": 1760014700000, "license_headers": { "X-License-Token": "eyJhbGciOiJIUzI1NiJ9.example" }, "key_systems": { "com.widevine.alpha": { "license_url": "https://license.example/widevine" } }}Missing or invalid credentials.
Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{ "error": "unauthorized", "code": "unauthorized", "message": "Authentication required"}The principal lacks the required scope or role.
Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{ "error": "forbidden", "code": "forbidden", "message": "Missing required scope: write"}The request conflicts with the resource’s current state.
Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{ "error": "upload_in_progress", "code": "upload_in_progress", "message": "An upload is already in progress for this asset"}Too many requests in the current window.
Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{ "error": "rate_limited", "code": "rate_limited", "message": "Too many requests", "details": { "retry_after": 60 }}Headers
Section titled “Headers”Retry-After
integer
Seconds to wait before retrying.
A dependency (DRM, Google, playback signing) is not configured or unavailable.
Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{ "error": "playback_unavailable", "code": "playback_unavailable", "message": "Playback is not configured"}