Model Structure
The unique subscriber ID of the subscriber
The display name of the subscriber
The stream ID that this subscriber has access to
Secret code of the subscriber in Base32 format. Used for TOTP token generation. Write-only field for security
Type of subscriber access. Possible values:
play- Subscriber can only play/watch the streampublish- Subscriber can publish to the stream (also includes play access for video conferencing)
Current count of active concurrent connections for this subscriber
Maximum number of concurrent connections allowed for this subscriber
Type of block applied to the subscriber. Possible values:
play, publish, publish_playUnix timestamp in milliseconds until which the subscriber is blocked. Value of
0 means not blockedThe IP address of the node where subscriber is registered (for cluster environments)
The average video bitrate for this subscriber in bits per second
The average audio bitrate for this subscriber in bits per second
Custom TOTP expiry period in seconds for this subscriber. If null, falls back to global timeTokenPeriod setting
Authentication Flow
The Subscriber model enables time-based token authentication:- Create Subscriber: Generate a subscriber with a secret (b32Secret)
- Generate Token: Use the secret to generate a TOTP token
- Access Stream: Client uses subscriberId and token to access the stream
- Token Validation: Server validates the token against the subscriber’s secret
- Access Granted: If valid and within time window, access is granted
Access Types
Play Subscriber
Subscribers withtype: "play" can only watch/play the stream. This is suitable for viewer authentication.
Publish Subscriber
Subscribers withtype: "publish" can publish to the stream and also play it (useful for video conferencing).
Blocking Subscribers
You can temporarily or permanently block subscribers:play- Block only playback accesspublish- Block only publish accesspublish_play- Block both publish and play access
Connection Limits
Control concurrent connections per subscriber:currentConcurrentConnections reaches concurrentConnectionsLimit, new connection attempts are rejected.
Custom TOTP Expiry
You can set a custom TOTP expiry period per subscriber:Example JSON
Related API Endpoints
- Create Subscriber -
POST /v2/broadcasts/{id}/subscribers - Get Subscriber -
GET /v2/broadcasts/{id}/subscribers/{subscriberId} - Delete Subscriber -
DELETE /v2/broadcasts/{id}/subscribers/{subscriberId} - List Subscribers -
GET /v2/broadcasts/{id}/subscribers/list/{offset}/{size} - Block Subscriber -
PUT /v2/broadcasts/{id}/subscribers/{subscriberId}/block - Unblock Subscriber -
PUT /v2/broadcasts/{id}/subscribers/{subscriberId}/unblock
Security Considerations
- The
b32Secretfield is write-only and never returned in GET requests - TOTP tokens are time-limited and expire based on
totpExpiryPeriodSeconds - Store subscriber secrets securely on the client side
- Use HTTPS for all API requests to protect tokens in transit
- Implement rate limiting to prevent token brute-force attacks
- Monitor
currentConcurrentConnectionsto detect account sharing
