
DrmToken) to the client.DrmTokenDrmToken is essentially a variant of JSON Web Token (JWT). It also consists of three parts: the header, the payload, and the signature. However, unlike JWT, VOD connects the three parts with ~.{"alg": "HS256","typ": "JWT"}
{"type": "DrmToken","appId": 1500014561,"fileId": "387702307091793695","currentTimeStamp": 1650964374,"expireTimeStamp": 2147483647,"random": 4220003655,"issuer": "client"}
Parameter | Type | Required | Description |
type | string | Yes | The signature type, which should be set to DrmToken. |
appId | int64 | Yes | The AppId. |
fileId | string | Yes | The file ID. |
issuer | string | Yes | The issuer, which should be set to client. |
currentTimeStamp | int64 | Yes | The current time (Unix timestamp). |
expireTimeStamp | int64 | No | The expiration time (Unix timestamp). If you do not specify this, the signature will not expire. |
random | int64 | No | A random number. |
Signature = HMACSHA256(base64UrlEncode(Header) + "." + base64UrlEncode(Payload), pkey)base64UrlEncode, see Base 64 Encoding with URL and Filename Safe Alphabet.pkey) in the VOD console:
DrmToken example{"alg": "HS256","typ": "JWT"}
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9{"type": "DrmToken","appId": 1500014561,"fileId": "387702307091793695","currentTimeStamp": 1650964374,"expireTimeStamp": 2147483647,"random": 4220003655,"issuer": "client"}
eyJ0eXBlIjoiRHJtVG9rZW4iLCJhcHBJZCI6MTUwMDAxNDU2MSwiZmlsZUlkIjoiMzg3NzAyMzA3MDkxNzkzNjk1IiwiY3VycmVudFRpbWVTdGFtcCI6MTY1MDk2NDM3NCwiZXhwaXJlVGltZVN0YW1wIjoyMTQ3NDgzNjQ3LCJyYW5kb20iOjQyMjAwMDM2NTUsImlzc3VlciI6ImNsaWVudCJ9muHWnxX9dXsUAkCzw4uXGcvwKDoA19BkR-hCJVrXyvY. It is generated using pkey (whose value is JduzsUuRvGVPRHvIYwLv).~ and you will get the DrmToken, which is eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9~eyJ0eXBlIjoiRHJtVG9rZW4iLCJhcHBJZCI6MTUwMDAxNDU2MSwiZmlsZUlkIjoiMzg3NzAyMzA3MDkxNzkzNjk1IiwiY3VycmVudFRpbWVTdGFtcCI6MTY1MDk2NDM3NCwiZXhwaXJlVGltZVN0YW1wIjoyMTQ3NDgzNjQ3LCJyYW5kb20iOjQyMjAwMDM2NTUsImlzc3VlciI6ImNsaWVudCJ9~NN_EBW7VxGK69v-w9Q7Dw-sm8Uryfe_NdRUe3RZZ4wY.MediaInfoSet.AdaptiveDynamicStreamingInfo.AdaptiveDynamicStreamingSet.Url).https://widevine.drm.vod-qcloud.com/widevine/getlicense/v2https://fairplay.drm.vod-qcloud.com/fairplay/getlicense/v2Parameter | Description |
drmToken | The authentication token. |
Status Code | Description |
200 | Request successful. |
400 | Parameter error. |
403 | Authentication failed. |
500 | Internal error. |
https://widevine.drm.vod-qcloud.com/widevine/getlicense/v2?drmToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9~eyJ0eXBlIjoiRHJtVG9rZW4iLCJhcHBJZCI6MTUwMDAxNDU2MSwiZmlsZUlkIjoiMzg3NzAyMzA3MDkxNzkzNjk1IiwiY3VycmVudFRpbWVTdGFtcCI6MTY1MDk2NDM3NCwiZXhwaXJlVGltZVN0YW1wIjoyMTQ3NDgzNjQ3LCJyYW5kb20iOjQyMjAwMDM2NTUsImlzc3VlciI6ImNsaWVudCJ9~NN_EBW7VxGK69v-w9Q7Dw-sm8Uryfe_NdRUe3RZZ4wYWas this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback