ThrillConnect: WebSocket API

ThrillConnect exposes an authenticated WebSocket API for use by your frontend or service applications.

Connecting to the WebSocket endpoint

In order to connect to the ThrillConnect WebSocket endpoint, create a WebSocket client and connect to:

ws://thrillconnect_service_host/v1/events/:operator_id/:brand_id

ParameterTypeRequiredDescription
operator_idPathYesThe operator ID of the casino
brand_idPathYesThe brand ID of the casino
tokenQueryYesThe session token for the player that is connecting
currencyQueryYesThe currency of the player that connecting

Example

ws://thrillconnect_service_host/v1/events/casino-group/awesome-brand?token=session_token_00001&currency=USD

Once a connection is established, ThrillConnect will attempt to authenticate the player using the token provided with your wallet/account system. This authentication will take place using the Authentication endpoint via ThrillGate.

If authentication is successful, the connection will remain open. If authentication fails, the connection will be closed with a 401 error.

WS Message Structure

All messages that you receive from the ThrillConnect WebSocket connection have the following structure:

{
    "msg_type": String, ("Event" | "Message" | "Error"),
    "source": String,
    "msg_name": String,
    "operator_id": String,
    "brand_id": String,
    "player_id": String,
    "data": Object,
    "timestamp: Number
}
FieldDescription
msg_typeThis can contain one of the following values:

- Event
- Message
- Error
sourceThis indicates the source system that sent the message. In the case of ThrillPots, the value will be thrillpots
msg_nameThe name of the message. Refer to the events and requests sections for more information
operator_idThe operator ID that this message is targetted for
brand_idThe brand ID that this message is targetted for
player_idIf not null, the player_id that the message is targetted for
dataThe message payload (structure is dependent on the msg_type)
timestampThe timestamp (UNIX epoch) that the message was sent at