Skip to main content

Token revocation & session control

Token revocation invalidates a specific playback token across the whole delivery network. Active sessions using it are disconnected, and every later playback attempt with it is blocked. Use it when a token turns up somewhere it shouldn't, instead of waiting for the token to expire.

Revocable vs. non-revocable tokens​

You decide at creation time whether a token can be revoked. You can't make an existing token revocable later.

Revocable tokenNon-revocable token
Created with"revocable": trueDefault (no revocable field)
Maximum lifetime24 hours365 days
Can be revokedYesNo

The 24-hour limit is deliberate: revocable tokens are meant for short-lived, high-security use. For non-revocable tokens, a short exp is your only control. See Playback tokens.

When to use revocable tokens​

  • High-value live events (betting, premium content, ticketed streams) where piracy risk is highest
  • Per-user tokens, so you can cut off one user without affecting anyone else
  • Short interactive sessions where fast revocation is an extra safety net

For long-running or low-risk streams where tokens expire within an acceptable time, short-lived non-revocable tokens can be enough.

Set it up​

Revoking takes two steps: create the token as revocable, then revoke it when you need to. An expired token can still be revoked for a 24-hour grace period after expiry, to stop sessions that keep running on it (tokens without forceDisconnect).

Who can use it: guest, free account or existing customer. The Builder Hub only demonstrates revocation on our demo stream; it doesn't revoke tokens of your own streams. For those, use the Dashboard or API tab.

  1. Open Build › Security › Manage tokens and, on the Revoke playback tokens card, click Show token revocation.
  2. Create a token, and open the player link in a second browser or on your phone.
  3. Click Revoke Token. Every player using the token disconnects at once.
Builder Hub token revocation demo: the player reads "Token revoked. The player was disconnected." next to the Create Token and Revoke Token buttons
After Revoke Token, the player disconnects; a new token is needed to watch again.

The demo uses 5-minute tokens.

Playback tokens you create under Manage tokens can be revoked when Valid for is 1 hour or 24 hours. Tokens valid for 7 or 30 days can't be revoked.

Error responses​

HTTPError codeMessageCause
4002011The token is not allowed for revocationThe token wasn't created with "revocable": true.
4002004Malformed JWTThe token string is invalid or corrupted.
40113API key is invalidWrong or invalid credential.
4032012The provided token doesn't belong to your organisationThe token belongs to a different organisation.

What revocation does​

  • Active playback sessions using the token are disconnected.
  • New playback attempts with the token are blocked on all edge servers.
  • Revocation is permanent for that token. You can't undo it; create a new token instead.
  • Other tokens, including other viewers' tokens for the same stream, aren't affected.

Session control on expiry​

Revocation is the immediate switch. For the normal end of a token's life, forceDisconnect decides what happens to viewers who are already watching:

forceDisconnectAt expiry
false (default)Active sessions keep playing. New connections, reconnects and stream or rendition switches are rejected.
trueAll active sessions using the token are disconnected.

In the Dashboard this option is called Force Disconnect on Expiration. Use true when access must end at a fixed time, for example a ticketed event or a pay-per-view window. Give the player a fresh token before expiry if viewers should keep watching.

Revocation vs. Guardian blocking​

Token revocationGuardian IP blockGuardian referrer block
TargetsOne tokenOne IP or CIDR rangeOne website domain
Active sessionsDisconnectedKeep running until the viewer disconnectsNot specified
New connectionsBlocked immediately on all edgesBlocked within 6 minutesBlocked
DurationPermanent for that token24 hours, then expiresUntil you remove it

Combine them: revoke the token to stop the session now, and block the relay's IP or range so a new token from the same source can't be used.

Next steps​

tip

Try it in the Builder Hub: on our demo stream, create a token, open the player link on your phone, revoke the token and watch both players disconnect. Start for Free