Skip to content
For LLMsView as Markdown·

Launch a vendor game for real money with a player token ​

http
POST https://api.onehazel.com/onehazel-api/embed/v1/{key}/launch

Unauthenticated. key is the operator's public embed key (never the operator id) and the browser Origin must be on the operator's allowed websites list, else 403 unauthorized with details.code SURFACE_ORIGIN_NOT_ALLOWED; an unknown or rotated key, an operator id in place of the key, or an account that is not active all get this route's unknown answer (404 game_unknown). The caller proves the player with a short-lived player token the casino minted server-side with its Surfaces embed secret (HS256 JWT, aud onehazel-surfaces, iss the operator id, lifetime at most 300 seconds). Body: { "key": "<connector key>", "game_code": "<game>", "player_token": "<jwt>", "language": "en", "client_type": "DESKTOP" | "MOBILE" } (language and client_type are optional). Starts a session through the operator's registered wallet and returns { "game_url": "<https url>" }. Errors use the flat { code, message, retryable } envelope: 400 invalid_request, 401 unauthorized ("player token invalid", for every token problem), 404 game_unknown (no live connection to that vendor, the operator turned the vendor's Show in lobby switch off, or no usable launch), 404 unavailable while OneHazel Surfaces is not enabled, and the wallet launch errors. Rate limited per client IP and per operator.

Section: Surfaces
Operation id: postEmbedV1ByKeyLaunch

Authentication ​

No authentication.

Parameters ​

NameInRequiredDescription
keypathyes

Request body ​

JSON object.

Responses ​

200 { "success": true, "data": ... }

Errors return { "success": false, "error": { "code": "...", "message": "..." } } with a 4xx or 5xx status.

Example ​

bash
curl -X POST "https://api.onehazel.com/onehazel-api/embed/v1/{key}/launch" \
  -H "Content-Type: application/json" \
  -d '{}'

Machine-readable: openapi.yaml, openapi.json.