join_room
Join an existing game room by providing a room ID and connection ID. Requires being in the lobby. Returns the assigned room slot. After joining, call set_ready to signal readiness for the match to start.
Instructions
Mutating. Join an existing room by taking its open seat. Requires state=in_lobby (call set_player_metadata first). room_id is the room's string identifier from list_rooms. Returns the assigned room_id and slot (A or B). Fails if the room is full, does not exist, or you are already in a room. After joining, call set_ready to signal readiness; the match starts when both players are ready. To leave before the match starts, use leave_room.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection_id | Yes | ||
| room_id | Yes |