PHPackages                             vdocipher/playback-token - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. vdocipher/playback-token

ActiveLibrary[Image &amp; Media](/categories/media)

vdocipher/playback-token
========================

VdoCipher playback token generator

v1.0.0(1mo ago)02↓85.7%MITPHPPHP ^8.0

Since Jun 5Pushed 1mo agoCompare

[ Source](https://github.com/VdoCipher/php-playback-token)[ Packagist](https://packagist.org/packages/vdocipher/playback-token)[ RSS](/packages/vdocipher-playback-token/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

vdocipher/playback-token
========================

[](#vdocipherplayback-token)

VdoCipher playback token generator.

Install
-------

[](#install)

```
composer require vdocipher/playback-token
```

Requires PHP 8.0+.

Quick start
-----------

[](#quick-start)

```
use VdoCipher\Playback;

$pb = new Playback($apiKey, [
    'apiKeyId' => 'your-api-key-id',
    'videoId'  => '1234567890abcdef1234567890abcdef',
    'userId'   => '27083',
]);

$token = $pb->getToken();
// Use $token in your VdoCipher player URL.
```

Error handling
--------------

[](#error-handling)

`getToken()` throws `VdoCipher\PlaybackException` (extends `\InvalidArgumentException`) on the first validation error. Catch it where you can produce a useful response — typically your controller or job handler:

```
use VdoCipher\Playback;
use VdoCipher\PlaybackException;

try {
    $token = (new Playback($apiKey, $payload))->getToken();
} catch (PlaybackException $e) {
    error_log('VdoCipher token error: ' . $e->getMessage());
    http_response_code(400);
    return;
}
```

API
---

[](#api)

MethodReturnsNotes`new Playback(?string $apiKey, ?array $data)`—Either arg may be null; errors surface from `getToken()`.`setKey(?string $key)`voidReplace the API key. Null clears it.`setPayload(?array $data)`voidReplace the payload. Null clears it.`getToken()``string`Token string on success. Throws `VdoCipher\PlaybackException` on the first error encountered.### Payload fields

[](#payload-fields)

KeyRequiredTypeNotes`apiKeyId`yesstringEnsure this stays secret on your server.`videoId`yesstring32-char lowercase hex.`policyId`nostringIf not specified, default policy is applied.`userId`nostring1–36 chars, `[a-z0-9_-]`.`ip`nostringCan lock the token to specific IP address.`watermarkValues`nostring\[\]Array of watermark substitution values.License
-------

[](#license)

[MIT](./LICENSE) Copyright (c) 2026 VdoCipher Media Solutions Pvt Ltd

The MIT license covers this SDK's source code. Use of the VdoCipher service is governed by the [VdoCipher Terms of Service](https://www.vdocipher.com/page/terms/).

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance90

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

50d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/21359ad936924de4c06b12ee192755a4337f15761710afc5877a6f943f1c8a47?d=identicon)[vdocipher](/maintainers/vdocipher)

---

Top Contributors

[![vibhavsinha](https://avatars.githubusercontent.com/u/1254236?v=4)](https://github.com/vibhavsinha "vibhavsinha (1 commits)")

---

Tags

tokenvideoDRMvdocipherplayback

### Embed Badge

![Health badge](/badges/vdocipher-playback-token/health.svg)

```
[![Health](https://phpackages.com/badges/vdocipher-playback-token/health.svg)](https://phpackages.com/packages/vdocipher-playback-token)
```

###  Alternatives

[php-ffmpeg/php-ffmpeg

FFMpeg PHP, an Object Oriented library to communicate with AVconv / ffmpeg

5.0k24.0M199](/packages/php-ffmpeg-php-ffmpeg)[danog/madelineproto

Async PHP client API for the telegram MTProto protocol.

3.5k902.0k24](/packages/danog-madelineproto)[vimeo/vimeo-api

Official PHP library for the Vimeo API.

4617.6M39](/packages/vimeo-vimeo-api)[vimeo/laravel

A Vimeo bridge for Laravel

4191.7M4](/packages/vimeo-laravel)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[codescale/ffmpeg-php

PHP wrapper for FFmpeg application

496275.8k2](/packages/codescale-ffmpeg-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
