Authenticate with the server.
Prior to authentication, you should perform a GET request to
/api/v1/ui/config
to get the current configuration. Within the returned JSON
you will find all of the necessary fields to authenticate.
Optional bot_Bot API key, if applicable
Optional bot_Bot username connecting, if applicable
Optional client?: stringClient name (your application name)
Optional client_Client version string.
Optional device_Client generated unique id for the device.
The JSON Web Token (user_jwt field) from /api/v1/ui/config. If
connecting as a guest, send ""
Optional language?: stringISO 639-1 language code used on this device.
Optional language_The version of the translation dictionary.
Optional user_Browser user agent (or websocket library)
Report connection count and device info for analytics. Sent on each (re)connect to track route reliability.
Device information for analytics segmentation
Duration in ms of the previous connection, or 0 if first connect
Network route name (e.g. "cloudflare", "google", "public")
How many times the client has connected this session
Sends a ping to the server. This message should be sent regularly. The default interval is 10 seconds. This keeps the connection alive and allows a client to measure clock drift and latency, both of which are vital to adjusting the client's game clock displays.
Client timestamp - milliseconds since epoch
Last clock drift measurement, or 0
Last latency measurement, or 0
Report measured latency for a specific network route
Measured latency in milliseconds
Whether the client is on a mobile device
Network route name
Report a ping timeout event for diagnostics. Sent when the client detects that a ping response (pong) was not received within the expected timeout window.
Device information
Whether the client is currently viewing their own live game
Last measured latency before timeout (ms)
Ping interval at time of timeout (ms)
Network route name (e.g. "cloudflare", "google", "public")
Timeout delay threshold that was exceeded (ms)
How many times the client has connected this session
Report an unrecoverable WebSocket error (e.g. close code 1014/1015)
WebSocket close code
Device information
Network route name
Error tag for categorization
Connection count at time of error
Messages that clients send, regardless of target server