Token & Device Limit
With token-based content access control, you will have the capabilities and flexibility:
- Playback Authorization: Content playback is exclusively granted with a valid token, which can be issued upon user authorization by your system, ensuring secure content access control.
- Concurrent Device Limit: The token system allows you to set device limits, specifying how many devices a token can simultaneously use for content playback.
- Membership System Integration: You can integrate the token with your existing membership system by including
customer_id
in your request parameters when generating tokens, enabling precise tracking of user engagement.
Enable Token-Protection for Your Content
To enable token-based security protection and specify the device limit number of each token for your content, set associate API request body during creation:
AOD:
POST /bv/cms/v1/aods
VOD:
POST /bv/cms/v1/vods
Livestream:
POST /bv/cms/v1/lives
Configure the privacy
request body with the following options:
Query Parameters | Description |
---|---|
type | SECURITY_PRIVACY_TYPE_TOKEN |
token | Specify the number of device limit for each token in the device_limit field |
Here's an example of the request body that sets the privacy type to token-based with 100 device limit for simultaneously playback of each token:
"privacy":{
"type":"SECURITY_PRIVACY_TYPE_TOKEN",
"token":{
"device_limit":100
}
}
Generate Tokens
To generate tokens for content playback, use the following APIs:
- Resource Tokens
- Playback Tokens
If you are using an iframe player or a showroom website, make a POST request to the following API to request a resource_token
for integration:
POST /bv/cms/v1/resources/tokens
Query Parameters | Required | Description |
---|---|---|
resource_id | Required | The unique ID of your content. |
resource_type | Required | The streaming type of your content. |
customer_id | Optional | Your custom user ID to identify who is watching the content. This parameter is required if the content's security privacy is set to SECURITY_PRIVACY_TYPE_TOKEN . |
customer_name | Optional | Your custom user name to identify who is watching the content. |
Here is an example of a request body:
{
"resource_id": "<resource-id>",
"resource_type": "RESOURCE_TYPE_LIVE",
"customer_id": "<customer-id>",
"customer_name": "<customer-name>"
}
For more comprehensive iframe integration guide, refer to this documentation.
If you are using a player SDK, make a POST request to the following API to request a playback_token
for integration:
Query Parameters | Required | Description |
---|---|---|
resource_id | Required | The unique ID of your content. |
resource_type | Required | The streaming type of your content. |
customer_id | Optional | Your custom user ID to identify who is watching the content. This parameter is required if the content's security privacy is set to SECURITY_PRIVACY_TYPE_TOKEN . |
Here is an example of a request body:
{
"resource_id": "<resource-id>",
"resource_type": "RESOURCE_TYPE_LIVE",
"customer_id": "<customer-id>"
}
For more comprehensive player SDK integration guide, refer to the following resources:
If you are using a BlendVision One's pre-built showroom website (VOD, AOD, Livestream), you also have the capabilities of user authorization control through access codes
with device limit features.