Skip to content

Join 🚀🔗

Joins a game by the join_code field.

Request model🔗

{ "op": "Join", "d": { "join_code": String } }

Success response🔗

The server sends back a response with the game_id field.

{
    "response": {
        "d": {
            "game_id": Uuid
        },
        "op": "Join"
    },
    "status": true
}

Immediately after receiving a success response, a ConnectedClients event is sent with all the clients already in the game prior to joining.

{
    "response": {
        "d": {
            "event": {
                "clients": [
                    {
                        "client_id": Uuid,
                        "nickname": String
                    }
                    ...
                ],
                "game_id": Uuid
            },
            "op": "ConnectedClients"
        },
        "op": "GameEvent"
    },
    "status": true
}

Errors🔗

Errors that may occur while creating a game.

  1. NotIdentified
  2. AlreadyInGame
  3. NotFound
Back to top