Create playback token
POSThttps://api.one.blendvision.com/bv/cms/v1/tokens
Creates a token that can be used to access a live or vod and request a DRM license.
- Returns a
404
/NotFound
error if the requested resource is not found.
Request
Header Parameters
To invoke this API using api_token
, you need to set the x-bv-org-id
header to specify the organization for which you want to perform the action.
- application/json
Body
required
Required. The unique id of live or VOD.
Possible values: [RESOURCE_TYPE_LIVE
, RESOURCE_TYPE_VOD
, RESOURCE_TYPE_LIVE_EVENT
, RESOURCE_TYPE_LIVE_EVENT_RECORDING
, RESOURCE_TYPE_VOD_EVENT
, RESOURCE_TYPE_AUDIO_EVENT
, RESOURCE_TYPE_VOD_ENCODING
]
Required. The customer ID for identifying who is playing the resource.
Optional. If provided, the token will expire at the specified UTC time.
This field cannot be used in conjunction with the expires_in
field.
If neither field is set, will use the default expiration time.
Optional. If provided, the token will expire after the specified duration.
This field cannot be used in conjunction with the expired_at
field.
If neither field is set, will use the default expiration time.
Responses
- 200
- 400
- 401
- 403
- 500
- default
A successful response.
- application/json
- Schema
- Example (from schema)
Schema
Output only. The access token for live or VOD.
{
"token": "string"
}
A bad request response.
The code
is 3
means got an invalid argument. There are more HTTP status code mappings listed on here and gRPC code on here.
- application/json
- Schema
- Example (from schema)
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
A unauthenticated response.
The header authorization
was missing or unidentified.
- application/json
- Schema
- Example (from schema)
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
A forbidden response.
It means that the provided authorization
did not have enough permission to access the resource or the API.
- application/json
- Schema
- Example (from schema)
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
A server error response. There are more HTTP status code mappings listed on here.
- application/json
- Schema
- Example (from schema)
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
An unexpected error response.
- application/json
- Schema
- Example (from schema)
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Authorization: authorization
name: authorizationtype: apiKeydescription: Enter the token with Bearer schema prefix, eg. `Bearer <token-string>`in: header
- curl
- python
- go
- nodejs
- php
- CURL
curl -L 'https://api.one.blendvision.com/bv/cms/v1/tokens' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'authorization: <API_KEY_VALUE>' \
-d '{
"resource_id": "string",
"resource_type": "RESOURCE_TYPE_LIVE",
"customer_id": "string",
"expired_at": "2024-07-29T15:51:28.071Z",
"expires_in": "string"
}'