Unlocking Content with Entitlements

This article explains how to unlock content for your subscribers with Cleeng entitlements.

Managing subscriber access to your digital assets can be complex - especially when dealing with multiple platforms, devices, and subscription scenarios. Cleeng simplifies this process with a robust, integrated entitlement engine that works in real-time, scales with peak volumes, and protects your valuable content.

With Cleeng, you can unlock a variety of digital assets: full or partial app access, video streams, articles, or downloadable resources. This guide walks you through the basics of integrating Cleeng entitlements and explores advanced options for managing subscriber access efficiently.

What is Entitlement Management?

Entitlement management is the system that determines what content each customer can access. Think of it as a gatekeeper for your platform - it ensures people can only use the content or features they've paid for, whether it's a basic subscription, an add-on, or a special regional offer.

Cleeng sits right between your Billing Channels (Direct Web, Apple IAP, Google Play, Roku, Amazon) and your Application Layer (Web Player, Mobile Apps, Smart TVs, CMS). It automatically tracks every subscription event across all channels and handles three main pillars:

  • Content Provisioning: Determining what's included in each plan.
  • Access Control: Keeping user access up to date in real-time as they subscribe, renew, or cancel.
  • Monetization Intelligence: Generating useful data from access checks to help you refine your packaging and pricing strategies.

This approach centralizes the complex logic, so your application only needs to ask one simple question: "Can this user access this content right now?"

How Cleeng entitlements work

Cleeng automatically updates entitlements for each subscriber in real-time. Whenever a subscriber’s status changes - whether it’s a free trial, an initial purchase, an in-app upgrade, a refund, a chargeback, or a failed recurring payment - the entitlement engine ensures that access rights are updated immediately.

The result: you can check access for any user any time without additional complexity or manual work.

To unlock content for subscribers, you typically need just one API call. This tutorial covers both basic integration and more advanced configurations.

👍

Tip

Many partners have pre-integrated Cleeng entitlements with their content management system (CMS) or Online Video Platform (OVP). Check with your CMS/OVP provider before implementing your own integration.

When to check for entitlements

Entitlement checks should occur:

  • immediately after user login to determine content access and prevent duplicate purchases, and
  • again right before serving any specific asset to enforce the correct access level and trigger protections such as DRM or license keys.

Understanding the Entitlement Object

At a technical level, an entitlement is an object representing a customer’s right to access a specific offer (offerId), or tag (see below). It is the core mechanism for controlling access and is primarily managed via Cleeng’s APIs.

A sample entitlement object:

{
  "accessGranted": true,
  "expiresAt": 1651915800,
  "message": "Success",
  "customerId": 123456789
}

Understanding the response fields:

  • accessGranted: This is the only field you need to check for playback. If it is true, your player can play the content. If false, access should be blocked. Cleeng handles subscription status internally to produce this single boolean.
  • expiresAt: Do not use this for granting access, as due to a Grace period or reconciliation scripts this can be lapsed while the access is still valid.

Integration Options

Cleeng offers two primary integration paths for performing an entitlement check, allowing you to choose the best approach based on your security needs and technical architecture:

Option 1: Backend integration with Core API (Recommended)

Use case:

Maximum control, custom business logic, enterprise-grade security.

Prerequisites

  • Developer access to the back-end service that delivers your content.
  • Your Cleeng API key (publisher token) from the dashboard.
  • Access to the Cleeng customerId by decoding the JWT and the Cleeng offerId.

How it works

The backend API call checks entitlements by sending the customerId and offerId. The API responds with a boolean accessGranted flag. See examples in PHP and Node.js.

Option 2: Frontend integration with MediaStore APIs

Use case:

Ideal for rapid deployment, testing, or when backend integration is not feasible. Recommended for our freemium Cleeng Pro solution using hosted customer flows.

Prerequisites

  • Developer access to the frontend that renders content.
  • Access to the JWT returned by hosted widgets.
  • The Cleeng offer ID.

How it works

The frontend API call checks entitlements using the JWT and offer ID. The response contains the accessGranted flag, which determines whether the content is shown. See the example in JavaScript.

Advanced entitlement features:

  1. DRM & License Keys: Protect digital assets further by using digital rights management (DRM) or license keys to prevent illegal distribution. Please consult with your online video platform (OVP) or content management system (CMS) provider.
  2. Listing Entitlements: Use the List Entitlements API to display all assets a user can access—useful for video libraries with locked and unlocked content.
  3. Tags: Entitlements can be assigned using “tags” instead of offer IDs, allowing flexible content packaging.
  4. Grace Period: The accessGranted flag determines access, not the expiresAt timestamp. Grace periods may allow continued access after expiration.
  5. Regional Access: Assuming you have different content to deliver, you can leverage dedicated offers e.g., S123123123_US vs S789789789_CA, or orchestrate this on the content delivery network (CDN) level via geo-restrictions. Please consult your CDN, OVP or CMS provider.
  6. Caching Strategy: For high-volume applications, consider implementing a caching strategy to optimize performance. Please validate every 24 hours to not interfere with churn prediction algorithms.
  7. In-app Systems: For Apple, Google, or other third-party purchases, you can configure server-to-server notifications to keep entitlements synchronized with Cleeng.

Conclusion

Cleeng’s entitlement engine ensures secure, real-time management of subscriber access across platforms and devices. Choosing between backend and frontend integration depends on your technical capabilities, security requirements, and deployment needs.

By implementing entitlements with Cleeng, you guarantee a smooth experience for subscribers while keeping your content protected and accessible only to authorized users.

Up next

Now you can explore specific examples and code snippets to manage entitlements. See the next page for PHP, Node.JS and JavaScript examples.