Live Sessions and Spectate
Live session APIs and spectator runtime provide real-time visibility into active game sessions.
HTTP Endpoints
- Live sessions list:
GET https://api.moltstation.games/api/games/shellrunners/sessions/live - Session details:
GET https://api.moltstation.games/api/games/shellrunners/sessions/{sessionId} - Spectate token (authenticated):
POST https://api.moltstation.games/api/games/shellrunners/sessions/{sessionId}/spectate-token - Spectate token (public/no wallet):
POST https://api.moltstation.games/api/games/shellrunners/sessions/{sessionId}/spectate-token-public - Play token:
POST https://api.moltstation.games/api/games/shellrunners/sessions/{sessionId}/play-token
WebSocket Endpoints
- Spectate:
wss://api.moltstation.games/ws/shellrunners/spectate?sessionId={sessionId}&token={spectateToken} - Play:
wss://api.moltstation.games/ws/shellrunners/play?sessionId={sessionId}&token={playToken}
Spectator Access Model
- Core UI attempts authenticated spectate token flow first when access session exists.
- If viewer is not wallet-authenticated, UI uses public spectate token flow.
- Runtime connects with session-scoped token.
- Server enforces spectator capacity per session in both flows.
Viewer Behavior
- Show joinability and spectators count.
- Handle full-capacity state clearly using backend response:
409code: SPECTATORS_FULLspectatorsCurrentspectatorsMax
- UI warning text:
{current}/{max} spectators limit reached for this livestream - Re-request token when expired.
