Playback TokenMint a playback token

Mint a playback token

Mints a short-lived (~60 seconds) x-dt-auth-token JWT for a player embed to present to DRMtoday's license servers right before playback starts. Alternative to self-signing with the CRT signing secret.

curl -X POST "https://api.5centscdn.com/v2/drm/token" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "contentId": "2ba1e28f1b9614c18c9318c5293d78df",
  "zoneid": 20456,
  "relativepath": "movies/trailer/master.m3u8",
  "userId": "viewer-4e01cc4e"
}'
{
  "result": "success",
  "token": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJ...",
  "exp": 1758648660,
  "assetId": "2ba1e28f1b9614c18c9318c5293d78df",
  "licenseServers": {
    "widevine": "https://lic.drmtoday.com/license-proxy-widevine/cenc/?specConform=true",
    "playready": "https://lic.drmtoday.com/license-proxy-headerauth/drmtoday/RightsManager.asmx",
    "fairplay": "https://lic.drmtoday.com/license-server-fairplay/",
    "wiseplay": "https://lic.drmtoday.com/license-proxy-wiseplay/"
  },
  "fairplayCertUrl": "https://lic.drmtoday.com/license-server-fairplay/cert/5centscdn_svc10001"
}
POST
/drm/token
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key (sent in header)

Content-Typestring
Required

The media type of the request body

Options: application/json
contentIdstring

DRMtoday asset ID. Required unless zoneid and relativepath are both given, in which case the content ID is derived as md5("{zoneid}:/{relativepath}").

zoneidinteger

Push zone ID of the asset. Use together with relativepath instead of contentId.

relativepathstring

Path of the asset relative to the zone root. Use together with zoneid instead of contentId.

userIdstring

Optional viewer or session identifier, included in DRMtoday's delivery logs.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. Provide your API key in the header.

Body

application/json
contentIdstring

DRMtoday asset ID. Required unless zoneid and relativepath are both given, in which case the content ID is derived as md5("{zoneid}:/{relativepath}").

Example:
2ba1e28f1b9614c18c9318c5293d78df
zoneidinteger

Push zone ID of the asset. Use together with relativepath instead of contentId.

Example:
20456
relativepathstring

Path of the asset relative to the zone root. Use together with zoneid instead of contentId.

Example:
movies/trailer/master.m3u8
userIdstring

Optional viewer or session identifier, included in DRMtoday's delivery logs.

Example:
viewer-4e01cc4e

Responses

resultstring

Operation outcome.

Allowed values:successerror
tokenstring

Signed x-dt-auth-token JWT, valid for about 60 seconds.

expinteger

Token expiry as a Unix epoch timestamp in seconds.

assetIdstring

DRMtoday asset ID the token was minted for.

licenseServersobject

License server URLs for each DRM system.

fairplayCertUrlstring

FairPlay certificate URL for this service. Null if no FairPlay certificate is uploaded.