Mint a short-lived WebSocket ticket
Exchanges the caller's API key for a short-lived (60s) signed ticket used to open the WebSocket at `wss://api.esportsodds.gg/v1/ws?token=...`. Keeps the raw key off the wire and out of the browser. Minting is authenticated, rate-limited and metered like any REST call. Response: `{"data": {"token": "...", "expires_at": "..."}}`.
Exchanges the caller's API key for a short-lived (60s) signed ticket used to open the WebSocket at wss://api.esportsodds.gg/v1/ws?token=.... Keeps the raw key off the wire and out of the browser. Minting is authenticated, rate-limited and metered like any REST call. Response: {"data": {"token": "...", "expires_at": "..."}}.
Primary auth (live). Authorization: Bearer <api-key> — the header takes precedence over the query fallback. The raw key is hashed (SHA-256, hex) and looked up in api.keys.key_hash; the raw value is never stored.
In: header
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/{game}/ws-token"{ "data": { "token": "string", "expires_at": "2019-08-24T14:15:22Z" }}{ "error": { "code": "not_found", "message": "not found", "request_id": "018f9c7e-8b2a-7e3d-9f10-2a4b6c8d0e1f" }}{ "error": { "code": "not_found", "message": "not found", "request_id": "018f9c7e-8b2a-7e3d-9f10-2a4b6c8d0e1f" }}