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)
Cancel a match request
Request a match via the automatch system
Get active automatch entries for the current user
Updates the config for the bot
Update the number of games that the bot is currently playing
Message to let the server know the client is still interested in the specified blitz or live challenge. These should be sent about once a second to prevent the server from canceling the challenge.
Join a chat channel
Channel to join
Leave a channel
Channel to leave
Send a private message to another user
Optional
as_Moderator option to send the chat from the system not from their personal PM
Message text
Player ID of the recipient
UUID for the message
Username of the recipient
Closes the current user's private message session with the given player id
Loads the current user's private message session history with the given player id
Begins a "super chat" session with the given player id, which creates an unclosable dialog if enable is true, and makes the dialog closable again if enable is false. This is only available to moderators.
Set to true if you want the modal to be unclosable, false if you want the modal to be closable again
Username of the recipient
Moderator only command to remove a single chat message
Moderator only command to remove all chat messages for a given player
Player id to remove all messages for
Sends a chat message to the given channel
Channel to send the message to
Message text
ID for the message
Sets a channel topic
In Japanese rules, if the game is found to be repeating, the players may opt to annul the entire game and start over.
This is largely undesired in an online setting and support for this will probably be removed in the future, dont' bother implementing this.
The game id
Cancels a game. This is effectively the same as resign, except the game will not be ranked. This is only allowed within the first few moves of the game. (See GobanEngine.gameCanBeCancelled for cancellation )
The game id
Sends a chat message to a game
The chat message
The game id
The move number currently being viewed
The type of chat message being sent
Moderator only command to remove a single chat message from a game
The game id
Sets conditional moves to be made on behalf of the player in response to a move by the opponent.
The conditional moves. The top level should be an array that looks
like [null, { ... }]
where the second element contains the responses
to the opponent's move.
The game id
The move number from which the conditional moves are rooted in
Connect to a game. Once connected, the client will receive game updates relevant to the game.
Optional
chat?: booleanIf true, the client will receive the game chat log and new chat events
The game id to connect to
The game id
Disconnect from a game. This will stop game updates for a particular game.
Update your latency information for a particular game. This is used for clock synchronization. It is not strictly required, however strongly suggested for live games.
The game id
Network latency, measured in milliseconds. See net/ping to measure this.
Returns an event log for the given game. This is primarily for moderation purposes, although the endpoint is generally available to all users.
Submit a move for a game
Optional
blur?: numberMaximum number of milliseconds the client was out of focus between the last move and this move
Optional
clock?: JGOFPlayerClockClock according to the client. If this is within the margin of error of the server's clock, the server will accept the new clock value. If not provided, the server clock will be used.
The game id
The move number to play at
Pauses the game clocks
The game id
Request the server end a game that someone has left without resigning from
Request that the game be annulled or not
The game id
The proposed winner
Request the server end a game that is being stalled by one of the players. This will only work if the server agrees in the outcome.
The game id
The proposed winner
Accepts the stones as removed. Once both players have accepted the same stones, the stone removal phase will conclude and the game will finish.
The game id
All of the stones that are accepted as removed, and all intersections marked as dame
Japanese rules technically have some special scoring rules about whether territory in seki should be counted or not. This is supported by the backend but clients should always set this to false in this era of the game, the official client no longer displays this as an option to the user as it was very largely unused and was a large source of confusion.
Rejects the removed stones and resumes the game from the stone removal phase
The game id
Sets removed stones in the stone removal phase.
The game id
Optional
needs_List of intersections that need to be sealed before the game can be
correctly scored. Note, if this is undefined, the value will not
be changed on the server side. To specify there are no more intersections
that need to be cleared, set it to []
specifically.
True if the stones should be marked as removed (or intersections marked as dame if there is no stone there), false if they should be marked as not removed / open area.
List of intersections that are to be removed.
Optional
strict_Japanese rules technically have some special scoring rules about whether territory in seki should be counted or not. This is supported by the backend but the official client no longer displays this as an option to the user as it was very largely unused and was a large source of confusion. This field is deprecated and will likely be removed in the future.
Resigns from the game
The game id
Resumes the game clocks
The game id
Inform the server that the client believes it's clock has timed out and the game should be ended in a timeout. This is not strictly necessary to implement as the server will also timeout games, however there is a grace period to account for network latency, so well behaved clients can (and should) send this message to be very exact with timeouts.
The game id
Accepts an undo
The game id
The current move number
Cancels an undo request
The game id
The current move number
Requests an undo
The game id
The current move number
Connects to the game list count.
Once connected you'll start receiving gamelist-count
or
gamelist-count-${channel}
messages.
Optional
channel?: stringThe group or tournament channel to subscribe to. If no channel is provided, the global server counts will be sent
Disconnects from the game list count
Optional
channel?: stringThe group or tournament channel to unsubscribe from. If no channel is provided, the global server counts will be unsubscribed from
Queries the server for a list of games
Optional
channel?: stringThe group or tournament channel to query
The number of games to skip before returning results
Number of games to return, between 1 and 300
Filtering options
Retrieve host information for the termination server you are connected to
Sends an "Inter Tab Communication" message to all other connected clients for the current user. This includes other devices, so the "Tab" part is a bit of a misnomer.
User defined data
User defined event string
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
Deletes a notification
Remove the given key from remote storage system for this user
For more details on the remote storage replication system see: https://github.com/online-go/online-go.com/blob/devel/src/lib/data.ts
Set the given key in the remote storage system for this user
For more details on the remote storage replication system see: https://github.com/online-go/online-go.com/blob/devel/src/lib/data.ts
Requests all updated key/value pairs for this user since the provided timestamp (as as ISO 8601 string).
For more details on the remote storage replication system see: https://github.com/online-go/online-go.com/blob/devel/src/lib/data.ts
ISO 8601 timestamp. Updates made after this timestamp will be sent to the client.
Append a review action to the review log.
Sends a chat message to a review
The chat message
The root of the branch the user is viewing
The analysis branch the user is viewing
The review id
Moderator only command to remove a single chat message from a game
Connects to a review
The review id
Disconnects from a review
The review id
Subscribes to the seek graph events. The channel is required to be "global" for now and the foreseeable future.
Un-Subscribes to the seek graph events. The channel is required to be "global" for now and the foreseeable future.
Request the number of unique authenticated players online within the given interval
Interval in seconds
Subscribes to UI related push event messages sent to a particular channel
Un-Subscribes to UI related push event messages sent to a particular channel
Subscribes to online status updates for the given player ids
This is an exhaustive list of the messages that the client can send to the server.
This documentation is generated from the official typescript interface. To interpret it, you will every message organized as the name of the message followed by a function taking the message data parameters and returning what you can expect tor receive back.
For example, the authentication message documentation looks like this:
The command you will send is
authenticate
, the data you send will be an object with the following format:and you can expect to receive back either
undefined
or{id: number, username: string}