Skip to main content
HLS/DASH secure tokens are generated server-side by computing an MD5 hash of the video identifier, secret key, and expiration timestamp. The backend embeds the token and expiration in the URL path before delivering the signed URL to the client. A CDN resource with secure token protection enabled is required.

String to sign

video_id is the video slug for VOD or the stream ID for live streams. Without IP binding:
With IP binding (ties the token to the client’s IP address; requests from a different IP return 403 Forbidden):
The MD5 digest is encoded using unpadded Base64 URL encoding (Base64URL), where + and / are represented as - and _, and trailing = padding is omitted.

Code examples