You can create private access URLs for private videos, you can define time-restricted access rights to your videos. You can also track users in reports and analytics screens with the private access link's 'referenceName' you defined. You can create these private links manually from the admin screen if you wish.
In this article, we'll look at how these links can be dynamically created with code at runtime.
As a standard, the authorization header will be sent to all services as follows.
Authorization: Bearer <base_64_encoded(API_KEY)>
For a sample project with ADQl3MO6 Hash ID,
LIST ALL AVAILABLE PRIVATE URLS FOR SELECTED PROJECT
@POST
https://cinema8.com/api/v1/scene/private-token/list
Payload:
{
"start": 0,
"offset": 10,
"filterMap" : {
"hashId": ["ADQl3MO6"]
}
}
ADD NEW ACCESS
@POST
https://cinema8.com/api/v1/scene/private-token
Payload:
{
"hashId" : "ADQl3MO6",
"maxValidDuration": 30,
"referenceName": "john.doe@mail.com",
"validFrom": 1606471200000,
"validUntil": 1606557600000
}
UPDATE
@PUT
https://cinema8.com/api/v1/scene/private-token/[PRIVATE_TOKEN]
Payload:
{
"maxValidDuration": 40,
"referenceName": "john2.doe2@mail.com",
"validFrom": 1606557600000,
"validUntil": 1606730400000
}
DELETE
ANALYTICS
@POST
https://cinema8.com/api/v1/analytics/scene/heatmap?private-token=[PRIVATE_TOKEN]
Payload:
{
"start": 0,
"offset": 10
}