Docs sections
Search⌘KSigned links
Your server decides who can watch and issues a stream link with an expiry. dodocast only checks the signature.
Plan
Signed links are for direct stream links and are available on Pro and Business.
Signing key
- Go to Settings → Signing keys → Create key.
- Save the secret: it is shown once, when the key is created. Treat it like a database password and never send it to the browser — sign on the server only.
- The key has an ID,
sk_…, which goes into the token header.


A revoked key stops working within a minute, and so do the links signed with it.
Token
A standard JWT signed with HS256:
json
header: { "alg": "HS256", "typ": "JWT", "kid": "sk_your_key_id" }
payload: { "code": "abc123XYZ0", "iat": 1791676800, "exp": 1791678600 }codeis the code of the video, playlist, broadcast or channel. A token for one won't open another.iatandexpare required; the lifetime is 24 hours at most.- You can sign only your own content.
- Use the secret in the signature as a string, exactly as the console gave it to you.
js
// Node.js, jsonwebtoken library
import jwt from 'jsonwebtoken'
const token = jwt.sign({ code: 'abc123XYZ0' }, process.env.DODOCAST_SECRET, {
algorithm: 'HS256', keyid: 'sk_your_key_id', expiresIn: '30m',
})
const url = `https://stream.dodocast.com/s/${token}/hls/mp4/abc123XYZ0/master.m3u8`python
# Python, PyJWT library
import time, jwt
now = int(time.time())
token = jwt.encode({"code": "abc123XYZ0", "iat": now, "exp": now + 1800},
SECRET, algorithm="HS256", headers={"kid": "sk_your_key_id"})
url = f"https://stream.dodocast.com/s/{token}/hls/mp4/abc123XYZ0/master.m3u8"The Player SDK has this built in: signToken(), signedStreamUrl(), signedPlaylistItemUrl() from @dodocast/player/server.
Where the token goes
The token goes into the link path. The player requests the renditions, segments and encryption key with the same prefix on its own.
| What | Path |
|---|---|
| Video | /s/{jwt}/hls/mp4/{code}/master.m3u8 |
| Broadcast | /s/{jwt}/live/mp4/{code}/index.m3u8 |
| Channel | /s/{jwt}/ch/mp4/{code}/index.m3u8 |
| Course lesson (token for the playlist code) | /public/pl/{code}/item/{itemCode}?t={jwt} |


If a link returns 403
- you signed someone else's content — a key works only for your own;
expminusiatis more than 24 hours;- the token has a
purposefield — it must not; - the key was revoked (or recreated — check
kid); - your server's clock is more than 5 minutes fast.
Updated: