Pular para o conteúdo principal

Mint a viewer token for this battle's live feed

POST 

/admin/battles/:id/viewer-token

A short-lived token scoped to this battle only, so the panel can open the same WebSocket feed a viewer sees and watch a battle happen rather than only read its history afterwards.

Identical in shape and lifetime to what the casino's own POST /battles/{id}/viewer-tokens issues — same issuer, same 15 minutes, same role. Only the credential that buys it differs.

Connect to ws_url, offering ws_subprotocol and the token as the second subprotocol value. The feed is separate from this API's port.

Permission: battles.read

Request​

Responses​

A fresh viewer token