Skip to content

Tic-Tac-Toe List

The /tic-tac-toe/list endpoint lists all public games currently in progress. This endpoint does not return private or finished games.

Good to know

The list only includes public games currently in progress (not finished). Games are sorted by creation time with the most recent first. Private games are never included in this list for privacy reasons. You can join any listed game using its ID with the /tic-tac-toe endpoint.

Parameters

This endpoint does not require any parameters. It returns all currently active public games.

Code Examples

curl -X POST \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://api.sylvain.sh/v5/tic-tac-toe/list"

Response Fields

FieldTypeDescription
messagestringStatus message
countnumberTotal number of public games
gamesobject[]Array of public game objects
games[].idstringGame identifier
games[].playersstring[]Array of player usernames
games[].playersCountnumberNumber of players in the game
games[].movesarrayArray of moves made in the game
games[].turnstringUsername of the player whose turn it is
games[].statusstringGame status (waiting, ready)
games[].creationstringGame creation timestamp

Game Statuses

StatusDescription
waitingGame has one player, waiting for opponent
readyGame has two players and is active

Try It

Error Handling

This endpoint does not require parameters and will not return parameter-related errors.