Skip to main content

FindLobby

Finds a lobby based on the given criteria.

If a lobby is not found and prevent_auto_create_lobby is true, a new lobby will be created.

Header Parameters
  • origin string
Request Body required
  • game_modes string[] required

    Game modes to match lobbies against.

  • regions string[]

    Regions to match lobbies against. If not specified, the optimal region will be determined and will attempt to find lobbies in that region.

  • prevent_auto_create_lobby boolean

    Prevents a new lobby from being created when finding a lobby. If no lobby is found, a MATCHMAKER_LOBBY_NOT_FOUND error will be thrown.

  • captcha

    Methods to verify a captcha.

Responses

FindLobby 200 response

Schema
  • lobby object required

    A matchmaker lobby.

    • lobby_id string required

      Possible values: Value must match regular expression ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

      A universally unique identifier.

    • region object required

      A matchmaker lobby region.

      • region_id string required

        Possible values: 1 ≤ length ≤ 16, Value must match regular expression ^[a-zA-Z0-9](?:[a-zA-Z0-9]-?)+[a-zA-Z0-9]$

        A human readable short identifier used to references resources.

        Different than a rivet.common#Uuid because this is intended to be human readable.

        Different than rivet.common#DisplayName because this should not include special characters and be short.

      • display_name string required

        Possible values: 1 ≤ length ≤ 24, Value must match regular expression ^(?:[^ \n\r] ?)+[^ \n\r]$

        Represent a resource's readable display name.

    • ports object required

      A list of lobby ports.

    • player object required

      A matchmaker lobby player.

      • token password required

        Pass this token through the socket to the lobby server. The lobby server will validate this token with rivet.api.matchmaker#PlayerConnected$player_token.