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 token | Non-revocable token | |
|---|---|---|
| Created with | "revocable": true | Default (no revocable field) |
| Maximum lifetime | 24 hours | 365 days |
| Can be revoked | Yes | No |
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).
- Builder Hub
- Dashboard
- API
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.
- Open Build › Security › Manage tokens and, on the Revoke playback tokens card, click Show token revocation.
- Create a token, and open the player link in a second browser or on your phone.
- Click Revoke Token. Every player using the token disconnects at once.

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.
Who can use it: any login of your organisation with secure playback on. You create the revocable token in the nanoStream Dashboard and revoke it in the Guardian view of nanoStream Analytics.
Create a revocable token: in the Dashboard token form (lock icon, see Playback tokens), tick Enable Token Revocation.
Revoke it:
- Open the Guardian tab at https://metrics.nanostream.cloud/streamGuard and switch the analysis to Playback Token (or open https://metrics.nanostream.cloud/streamGuard?misTerm=jwtoken).
- Set the time range and find the token, for example by its JTI or User.
- Click the row to open the token breakdown. It shows the token payload and its Revocation Status.
- Revoke the token. You can also block the IP that used it.
During the grace period the view marks the token Expired, but Revoke stays available.
Who can use it: your backend, with an access token (bintu token) or your organisation API key.
Create a revocable token: add "revocable": true to the normal token request. All other fields (exp, nbf, domain, ip, user, tag, forceDisconnect) work the same way, and the scope can be streams, groupid or orgawide, as for any token.
curl -X POST https://token.nanostream.cloud/api/v1/splay \
-H "Content-Type: application/json" \
-H "X-BINTU-TOKEN: <YOUR_BINTU_TOKEN>" \
-d '{
"streams": ["XXXXX-YYYYY"],
"revocable": true,
"user": "user-4711"
}'
Revoke it:
POST https://token.nanostream.cloud/api/v1/splay/revoke
Content-Type: application/json
X-BINTU-TOKEN: <YOUR_BINTU_TOKEN>
curl -X POST https://token.nanostream.cloud/api/v1/splay/revoke \
-H "Content-Type: application/json" \
-H "X-BINTU-TOKEN: <YOUR_BINTU_TOKEN>" \
-d '{"token": "<YOUR_JWT>"}'
On success the service returns 204 No Content with no body. The revocation propagates to all edge servers as quickly as possible. You can authenticate with X-BINTU-APIKEY instead of X-BINTU-TOKEN. Errors are listed below.
Error responses
| HTTP | Error code | Message | Cause |
|---|---|---|---|
400 | 2011 | The token is not allowed for revocation | The token wasn't created with "revocable": true. |
400 | 2004 | Malformed JWT | The token string is invalid or corrupted. |
401 | 13 | API key is invalid | Wrong or invalid credential. |
403 | 2012 | The provided token doesn't belong to your organisation | The 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:
forceDisconnect | At expiry |
|---|---|
false (default) | Active sessions keep playing. New connections, reconnects and stream or rendition switches are rejected. |
true | All 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 revocation | Guardian IP block | Guardian referrer block | |
|---|---|---|---|
| Targets | One token | One IP or CIDR range | One website domain |
| Active sessions | Disconnected | Keep running until the viewer disconnects | Not specified |
| New connections | Blocked immediately on all edges | Blocked within 6 minutes | Blocked |
| Duration | Permanent for that token | 24 hours, then expires | Until 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
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