Private Token API

Private Token API

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. 

For manual Private Access URL creation please read Publishing with Private Token URL.

In this article, we'll look at how these links can be dynamically created with code at runtime.

This document will help you integrate Cinema8 Private Token to your applications. 

As a standard, the authorization header will be sent to all services as follows.

Headers:     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

https://cinema8.com/api/v1/scene/private-token/[PRIVATE_TOKEN]

 

ANALYTICS

@POST
https://cinema8.com/api/v1/analytics/scene/heatmap?private-token=[PRIVATE_TOKEN]

Payload:
{
   "start": 0,
   "offset": 10
}

 


    • Related Articles

    • Getting started with C8 API

      Cinema8 APIs to build extensive digital experiences within your videos. Cinema8 has an extensive API to support your business and your customers’ needs while developing interactive video-based solutions. Whether you are developing a web application, ...
    • Javascript API

      We will explain the basics of how to use the Cinema8 Player JavaScript API component of Cinema8 Player. It uses the same interface for HTML5 video player API and extends it with advanced features. Download js from cdn Download Cinema8 Player ...
    • REST API

      This section explains the basics of how to use the Cinema8 Rest API. Before You Begin You can access Cinema8 Rest API documentation and postman collection from this link. In order to access the rest services, you must create an API Key, you can ...
    • WebSocket API

      WebSocket powered widget development The WebSocket api within Cinema8 widget development environment allows you to create real-time communication and collaboration tools for your interactive videos. By leveraging websockets, you can create ...
    • Widget API

      Widgets are key expansion points of any cinema8 interactive video. While You can use any widget from the widget library you can also develop your own customized widgets with the C8 Widget Development environment. This article  walks you through the  ...