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
Parameter | Type | Required | Description |
---|---|---|---|
operator_id | Path | Yes | The operator ID of the casino |
brand_id | Path | Yes | The brand ID of the casino |
token | Query | Yes | The session token for the player that is connecting |
currency | Query | Yes | The currency of the player that connecting |
Example
ws://thrillconnect_service_host/v1/events/casino-group/awesome-brand?token=session_token_00001¤cy=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
}
Field | Description |
---|---|
msg_type | This can contain one of the following values: - Event - Message - Error |
source | This indicates the source system that sent the message. In the case of ThrillPots, the value will be thrillpots |
msg_name | The name of the message. Refer to the events and requests sections for more information |
operator_id | The operator ID that this message is targetted for |
brand_id | The brand ID that this message is targetted for |
player_id | If not null, the player_id that the message is targetted for |
data | The message payload (structure is dependent on the msg_type ) |
timestamp | The timestamp (UNIX epoch) that the message was sent at |