Skip to content

Livematches in play

Demo: Matchboard, opens in a new tab
Docs v2

WebSocketReal time

Stream ticket

POST

/v2/stream/ticket

Business and up

View as MarkdownTry in Playground →

Issues a one-time ticket for opening a connection, valid for 30 seconds. The call is authenticated, rate-limited and counted against your usage exactly like any other /v2 request, and it takes no request body.

Response

data
{ ticket: string; url: string; expiresInSeconds: number }
errors
403 ws_not_available — WebSocket access is not part of your plan

Any /v2 call can also come back with one of the common errors.

Example
$ curl -X POST -H "Authorization: Bearer sk_live_…" https://api.datasportsapi.com/v2/stream/ticket

{ "data": { "ticket": "8373e1…", "url": "wss://api.datasportsapi.com/?ticket=8373e1…", "expiresInSeconds": 30 } }