Concurrent Access Control

Overview

Concurrent access is access to content at the same time by multiple devices.

If you want to control the number of devices with concurrent access, you can use the following JSON RPC APIs:

They can be used with getAccessibleTags and getAccessStatus endpoints.

Register Concurrent Access

The registerConcurrentAccess endpoint allows for registering the device identifier (a unique deviceId; it can be an IP address) in order to limit concurrent access from multiple devices.

The provided identifier is added to the pool of identifiers and is kept in the pool for 3 hours. The current limit of identifiers in the pool is 4.

  • If the number of identifiers exceeds the limit in the pool, a complementary API verifyConcurrentAccess takes away access rights to the content.
  • If the limit is not exceeded, access is granted.

For better access control, there is a possibility to provide an optional parameter contentGroup. It instructs the system to create and keep a separate pool of device identifiers for it. Thanks to this you can build a more sophisticated concurrent access logic. If the parameter is not provided, the deviceId is added to the global pool of devices.

Verify Concurrent Access

You need to call the verifyConcurrentAccess endpoint to check if the next device is allowed to access the content.

  • If accessGranted=true, the device is allowed to access the content.
  • If accessGranted=false, the device is not allowed to access the content.

API Usage

The following sections shows concurrent access API usage together with getAccessStatus and getAccessibleTags APIs.

Usage with getAccessStatus()

1 if (getAccessStatus(customerToken, 'offer_id').accessGranted
2    && verifyConcurrentAcccess(publisherToken, customerToken, 'deviceId', 'Sport').accessGranted) { 
3    registerConcurrentAccess(publisherToken, customerToken, 'deviceId', 'Sport'); 
4    
5    // play content
6}

Usage with getAccessibleTags()

1 if (getAccessibleTags(publisherToken, customerToken).tags.indexOf('Sport')
2    && verifyConcurrentAcccess(publisherToken, customerToken, 'deviceId', 'Sport').accessGranted) { 
3    registerConcurrentAccess(publisherToken, customerToken, 'deviceId', 'Sport'); 
4    
5    // play content
6}

Did this page help you?