GET request will return a JSON object with one elment, named messages. The value of messages will be a list of objects, which will always have an element named type that will match one of the message types in the list below. Messages marked as channel messages will always include a channelId field that is the ID of this channel.
Always the first message you receive.
Field | Meaning |
---|---|
versionMajor | Major version number of server. |
versionMinor | Minor version number of server. |
versionBugfix | Bugfix version number of server. |
jsonClientBuild | A string with the date and time of this JSON translator build. |
Letting you know that a user's flags have changed.
Field | Meaning |
---|---|
user | The user information. |
Your user name is not on the server.
Your password did not match.
An attempt to log in as a guest failed because the user name selected is already present.
You have been disconnected because somebody logged in with your account on another system. Note: Despite the name of this message, you should not reconnect automatically when you get this. Most likely the user is gone and has logged in from another system, and reconnecting here will kick them back out.
You have logged in successfully.
Field | Meaning |
---|---|
you | A user that describes you. |
friends | Optional. A list of friends; see below for how each friend is structured. |
subscriptions | Optional. List of KGS Plus subscriptions that this account has. |
roomCategoryChannelIds | An object that maps room categories to the channel that has the master room list for that category. |
rooms | A list of all rooms on the server. See below for per-room information. |
Elements of friend list | |
friendType | One of buddy, censored, fan, or admin_track. |
user | A user giving information on the friend. |
notes | Optional. String information about the friend. |
Elements of room list | |
channelId | The channel ID of the room. |
category | The category of the room. |
Field | Meaning |
---|---|
user | The user whose archive this is. |
games | An array of game summaries. |
Indicates that you are no longer in this channel.
One or more games in the archive have changed.
Field | Meaning |
---|---|
games | An array of game summaries that have changed. |
A game in this archive has been removed.
Field | Meaning |
---|---|
timestamp | The time stamp of the game that was removed. |
The channel has been closed, and no longer exists.
The archive you have requested does not exist.
Field | Meaning |
---|---|
name | The name of the user whose archive you requested. |
Provides the names of one or more rooms.
Field | Meaning |
---|---|
rooms | An array of room information |
Room Information | |
channelId | The channel ID of the room |
name | The name of the room. |
private | Optional. If set, the room is private. |
tournOnly | Optional. If set, only tournament games in this room. |
globalGamesOnly | Optional. If set, all games in this room must be on the global game lists. |
You tried to join a channel that is private.
Field | Meaning |
---|---|
channelId | The channel that you tried to join. |
Indicates that you have joined a room.
Field | Meaning |
---|---|
games | A list of game channels that are in the room. |
users | A list of users in this room. |
You joined a game channel.
Field | Meaning |
---|---|
users | List of users in this room. |
sgfEvents | A list of SGF events that will rebuild the game to its current point. |
Various | All fields from a GAME_STATE message will be present as well. |
gameSummary | A game summary for this game. |
You joined a challenge.
Field | Meaning |
---|---|
users | List of users in this room. |
gameSummary | The game summary for this game. |
Various | All fields from a GAME_STATE message will be present as well. |
Field | Meaning |
---|---|
user | The user who has been added to this channel. |
A chat message from the channel. Announcements should be in bold, they are from admins and are meant to stand out. Moderated chat means that the message is coming from the current channel moderator on behalf of the user specified in the message.
Field | Meaning |
---|---|
user | The user who made the announcement. |
text | The text of the chat or announcement. |
A user has been removed from the channel.
Field | Meaning |
---|---|
user | The user. |
Field | Meaning |
---|---|
user | The user whose details channel this is. |
Various | All fields from DETAILS_UPDATE are present. |
If you are in a details channel when anything about the user changes, you get this update.
Field | Meaning |
---|---|
forcedNoRank | Boolean. If set, then this user's rank has been shut off by admins. |
privateEmail | Boolean. If set, then this user is keeping their email address private |
emailWanted | Boolean. If set, the user wants email from KGS. |
lastOn | The time when they were last logged in. |
regStartDate | When they registered this account. |
personalName | Their "real name." |
personalInfo | A block of text where they can put whatever they want. |
locale | The locale passed in on their last login. |
Optional. Their email address. Missing if they have it private, unless you are an admin, in which case it is provided anyway. | |
subscriptions | Optional. If this is your account or if you are an admin, your subscriptions are here. See LOGIN_SUCCESS. |
Sent if you ask for details on a nonexistant user.
Field | Meaning |
---|---|
name | The name for which you asked for a details channel. |
Image data for a user's avatar.
Field | Meaning |
---|---|
name | The name of the user whose image this is. Note that this message is unique in downstream messages, in that it has a name instead of a user. |
imageData | base64 encoded JPEG image data. If this is missing, it means that the user has no avatar. |
Rank graph data for a user details channel.
Field | Meaning |
---|---|
rankData | An array of rank graph data. One value per day, last value is for midnight GMT from yesterday. 30k is 0..99, 29k is 100..199, etc. 0x7fff indicates "no rank for this day." |
If you join a room category channel, you get these periodically.
Field | Meaning |
---|---|
rooms | A list of room entries. |
Room Entry Values | |
channelId | The room's channel ID. |
numUsers | The number of users in the room. |
numGames | The number of games in the room. |
Gives the room descripton text for a room, and the list of owners.
Field | Meaning |
---|---|
description | The room description text |
owners | Optional. A list of users. |
The name of this room has changed. If you aren't in the room, you need to re-request the name (or just forget about it).
You successfully created a room.
Field | Meaning |
---|---|
callbackKey | The callback key for your request. |
Field | Meaning |
---|---|
callbackKey | Optional. If you were the one to request this convo, you will see your callback key here. |
user | The other user in this convo. |
Can't make your convo. User doesn't exist.
Field | Meaning |
---|---|
callbackKey | Your callback key. |
Contains your messages from your mailbox.
Field | Meaning |
---|---|
messages | A list of messages. |
Message Contents | |
time | The timestamp of the message creation. |
user | The user who sent the message. |
text | The text of the message. |
You successfully sent somebody a message.
Field | Meaning |
---|---|
callbackKey | The callback key. |
The user who you tried to send a message to does not exist or has a full mailbox.
Field | Meaning |
---|---|
callbackKey | Your callback key. |
The user is connected. Instead of leaving them a message, a convo will be created.
Field | Meaning |
---|---|
callbackKey | Your callback key. |
You tried to change somebody's friend (buddy, fan, etc.) state, but they don't exist!
Field | Meaning |
---|---|
callbackKey | Your callback key. |
You successfully changed somebody's friend state.
Field | Meaning |
---|---|
callbackKey | Your callback key. |
friendType | The friend type they are or were. |
user | The user who you changed. |
notes | Optional. Your notes for the user. |
Informs you that your challenge has been created.
Field | Meaning |
---|---|
callbackKey | Your callback key. |
game | The game channel for the new game. |
Indicates that you could not create the challenge you wanted.
Field | Meaning |
---|---|
callbackKey | Your callback key. |
gameId | Optional. Honestly I'm not sure what this means. The Java client ignores it. The server fills it in sometimes, but it's very hard for me to tell exactly when or why. |
Indicates that your game proposal was invalid, because it specified a ranked game but the rules were incompatible with ranked.
Field | Meaning |
---|---|
field | One of SIZE, HANDICAP, KOMI, or TIME. |
tooBig | Boolean. If set, your value was too big for ranked; if clear, your value was too small. |
limit | The value you need to move to in order to play ranked. |
You have not done anything in a long time, and will be disconnected in 10 minutes.
Updates the list of games in a room or global game list.
Field | Meaning |
---|---|
games | A list of game channels. |
No data, just lets you know that your SYNC_REQUEST has been processed and returned.
Field | Meaning |
---|---|
callbackKey | The callback key from the request. |
A player in a challenge has proposed a game.
Field | Meaning |
---|---|
proposal | The proposal. |
When you are about to join a game but may not know about it (e.g., if you are not in a room with the game), this will be sent first.
Field | Meaning |
---|---|
game | The game channel. |
Updates with more information about the game.
Field | Meaning |
---|---|
Various | The game flags for this game. |
actions | A list of the actions available to each player in the game. See below for the format for each action. |
clocks | An object mapping role to the current state of that role's clock. See below for the format of each clock. May not be present when there are no clocks involved in the game. |
score | The final score from the game. Only present if the game has been scored. |
whiteDoneSent | Boolean. Indicates whether or not white has OKed the current score. Only present when scoring. |
blackDoneSent | Boolean. Indicates whether or not black has OKed the current score. Only present when scoring. |
whiteScore | The white score. Only present during scoring. |
blackScore | The black score. Only present during scoring. |
doneId | The current "done ID." Each time a player changes the life and death of stones in the game, the done ID is incremented, and the "doneSent" flag for each player is cleared. When sending a GAME_SCORING_DONE message, you must include the done ID, and if it is not up to date the message will be ignored by the server. |
Action Format | |
action | One of: MOVE, EDIT, SCORE, CHALLENGE_CREATE, CHALLENGE_SETUP, CHALLENGE_WAIT, CHALLENGE_ACCEPT, CHALLENGE_SUBMITTED, EDIT_DELAY. |
user | The user who can perform this action. Multiple users may have the same action available. |
Clock Format | |
paused | Boolean. If present, the clock has been paused, e.g. because the player has left the game. |
running | Boolean. If present, the clock is running. A clock is only running when it is the turn of the player who owns this clock. |
time | Double. The seconds left in the current period of the clock. |
periodsLeft | Only present for byo-yomi clocks. The number of periods left on the clock. |
stonesLeft | Only present for Canadian clocks. The number of stones left in the current period. |
Moves have been made in the game or playback.
Field | Meaning |
---|---|
sgfEvents | The SGF events needed to represent the changes in the game. |
User requested an undo. Ignore it to reject it, or send GAME_UNDO_ACCEPT to let the undo happen.
Field | Meaning |
---|---|
role | The role of the user requesting an undo. |
GAME_UNDO_REQUEST, GAME_UNDO_ACCEPT.
For teachers only. Set whether the chat is moderated or not.
Field | Meaning |
---|---|
mode | One of NORMAL, QUIET, or MODERATED. |
user | Optional. If the mode is MODERATED then this says who the moderator is. |
Indicates that your clock has run out. This is a test message to determine whether or not you are still connected. The client must immediately send a GAME_TIME_EXPIRED back to the server.
The game has ended.
Field | Meaning |
---|---|
score | The final score of the game. |
A game review has started. The review will be in a new channel.
Field | Meaning |
---|---|
originalId | The channel ID of the game. |
review | The game channel of the new review. |
An attempt to load a game from archives has failed.
Field | Meaning |
---|---|
gameSummary | The game summary of the game that failed to load. |
A block of audio for a channel you're in.
Field | Meaning |
---|---|
audio | Base64-encoded SPEEX audio data. |
Add one or more playbacks to those you know about.
Field | Meaning |
---|---|
playbacks | A list of playbacks. |
Playback Format | |
dateStamp | The date stamp of the playback. |
subscribersOnly | Boolean. If set, only KGS Plus subscribers can see the playback. |
gameSummary | The game summary of the playback. |
A playback has been set up for you to watch.
Field | Meaning |
---|---|
gameSummary | The game summary of the playback. |
You have joined a playback. No information, it all came in the prior PLAYBACK_SETUP message.
You have joined a global games list.
Field | Meaning |
---|---|
containerType | One of CHALLENGES, ACTIVES, or FANS. |
games | A list of game channels. |
Field | Meaning |
---|---|
subscriptions | A list of your subscriptions. |
A matching proposal has been uploaded by all players involved, and the game is starting.
Field | Meaning |
---|---|
gameChannelId | The channel ID of the new game. |
proposal | The accepted proposal. |
A message sent to all channels, all users. This should be displayed very prominently.
Field | Meaning |
---|---|
text | The text of the announcement. |
Random server statistics.
Field | Meaning |
---|---|
versionMajor | Same as HELLO. |
versionMinor | Same as HELLO. |
versionBugfix | Same as HELLO. |
serverStartTime | The time when the server last started up. |
bytesIn | Total bytes sent to the server (in the binary protocol) since it started. |
messagesIn | Total messages received by the server since it started. |
bytesOut | Total bytes sent out from the server (in the binary protocol). |
messagesOut | Total messages sent out from the server. |
logins | Number of users logged in right now. |
loginsMax | Most logins at any one time since server restart. |
accounts | Number of current accounts on the system. |
accountsMax | Most accounts ever in the server since it last started. |
rooms | Number of rooms on the server. |
roomsMax | Most rooms on the server at one one time since last restart. |
games | Number of games on the server. |
gamesMax | Most games on the server at once since last restart. |
Indicates whether your attempt to delete an account succeeded or failed.
Field | Meaning |
---|---|
name | The name that you tried to delete. |
You can't join that channel! It's for subscribers only.
All players have left the game.
The editor of this review or demonstration game has left.
Field | Meaning |
---|---|
user | The editor (in user format) who left the game. |
This channel doesn't allow talking.
You can't log in, an admin has blocked you.
Field | Meaning |
---|---|
text | The reason the admin gave for blocking you. |
You have blocked too many users. You can't do it any more.
Field | Meaning |
---|---|
name | The user who you were not able to block. |
Success or failure of your blocking somebody.
Field | Meaning |
---|---|
name | The name of the user you tried to block. |
Success or failure of your attempt to life the block of a user.
Field | Meaning |
---|---|
name | The name of the user whose block you tried to lift. |
You tried to play, but you are already playing in a game. Use simul if you want to play in several games at once.
Field | Meaning |
---|---|
callbackKey | Your callback key. |
You tried to start up a playback, but you are already watching one.
A game you played in has been started/loaded.
Field | Meaning |
---|---|
gameSummary | The game summary of the started game. |
Indicates whether your account to register succeeded or failed.
A game has been removed from this room or global game list.
Field | Meaning |
---|---|
gameId | The channel of the game that was removed. |
Same error happened while trying to do a playback.
Reasons why creating a room would fail.
Field | Meaning |
---|---|
callbackKey | Your callback key. |
Gives you the category of a room. Sent when a room changes categories.
Field | Meaning |
---|---|
category | The new category of the room. |
Your attempt to add/remove a user as an owner or somebody with access to a private room has failed.
Field | Meaning |
---|---|
name | The user you tried to add or remove. |
Field | Meaning |
---|---|
users | A list of users who have access to this private room or game. |
A playback has been deleted from the system.
Field | Meaning |
---|---|
timeStamp | The time stamp of the playback thas has been deleted. |
Another user has submitted a proposal in a challenge channel you own.
Field | Meaning |
---|---|
user | The user who submitted the proposal. |
proposal | The proposal. |
Your subscription will expire soon!
Field | Meaning |
---|---|
days | The number of days before your subscription expires. |
A room has left this category list.
Field | Meaning |
---|---|
roomId | The channel ID of the room that left. |
The other person in this convo does not want to talk.
You tried to set up roles for this game, but one of the players who you named does not exist or is not in this game.
Field | Meaning |
---|---|
name | The name of the user you tried to assign a role to. |
Your proposal has been declined.
One player has been swapped in for another.
Field | Meaning |
---|---|
role | The role that has changed users. |
user | The user who is now filling the role. |
(for CHANNEL_AD)
Everybody likes ads, right?
Field | Meaning |
---|---|
locationId | A number indicating where the ad should be shown. |
adId | Clicking the ad should take you to http://www.gokgs.com/servlet/ad/adId. |
imageData | Base64 encoded image data for the ad. |
Indicates that chat is now enabled in this channel.
You attempted to join this channel when you were already in it.
A tournament game that you are playing in has started.
Field | Meaning |
---|---|
gameChannelId | The channel ID of the tournament game that has started. |
roomChannelId | The channel ID of the room that contains the tournament game. |
clocksStarted | Boolean. If set, the setup time is over, the clocks are ticking. |
Indicates that a game is paused (in "prepare" mode).
Field | Meaning |
---|---|
prepType | One of END, TOURNAMENT, or AUTOMATCH. |
time | Optional. Floating point. The time (in seconds) until the game goes back to normal. Not present when prepType is END. |
You are about to start a playback seek.
When you do a playback seek, you get a big pile of SGF events. This message indicates that you have gotten all you need, you are at the seek position you wanted.
Tells you the auotmatch preferences that this user has uploaded before.
Field | Meaning |
---|---|
maxHandicap | The maximum number of handicap stones accepted in an automatch game. |
estiamtedRank | The rank we claim to be. 1k is the highest allowed. |
freeOk | If set, free (unrated) games are OK. |
rankedOk | If set, rated games are OK. |
robotOk | If set, games against robots are OK. |
humanOk | If set, games against humans are OK. |
blitzOk | If set, blitz games are OK. |
fastOk | If set, fast games are OK. |
mediumOk | If set, medium speed games are OK. |
unrankedOk | If set, playing against unranked players are OK. |
Tells you whether or not automatch is on right now.
Field | Meaning |
---|---|
enabled | Boolean |
The name of a game has changed.
Field | Meaning |
---|---|
name | Optional. The new name of the game. If this is missing, the game no longer has a name. |
Returns your tags. This object returns, in addition to the type field, a mapping from game time stamp to the tag of that game.
You want a tag archive for a user who does not exist.
Field | Meaning |
---|---|
name | The name of the user whose tag archive you tried to view. |
Some channels give you a burst of messages when you first join. This message indicates that the burst is over, you have all the information you will get about the channel.
Indicates that you have had the game in this exact position before. If you repeat it twice more, the game will be scored as no result. Only appears for Japanese-rules games.
Your connection has closed.
Field | Meaning |
---|---|
text | Optional. An English-language message indicating why the connection closed. Empty when the connection closes for "obvious" reasons, e.g. if you sent a LOGOUT message up to the server. |