⭐️ lobbies.find
Description
Finds a lobby based on the given criteria.
If a lobby is not found and prevent_auto_create_lobby
is false
,
a new lobby will be created.
When tokenless authentication is enabled in your game namespace, this endpoint does not require a token to authenticate. Otherwise, a development namespace token can be used for mock responses and a public namespace token can be used for general authentication.
Code Examples
Request
# Write the request body to body.json before running
curl -X POST -d '@body.json' 'https://api.rivet.gg/matchmaker/lobbies/find'
Request Parameters
origin
Query parameter, optional
Request Body
captcha
object
Methods to verify a captcha
captcha.hcaptcha
object
Captcha configuration.
captcha.hcaptcha.client_response
string
(required)
captcha.turnstile
object
Captcha configuration.
captcha.turnstile.client_response
string
(required)
game_modes
array<string>
(required)
max_players
integer
prevent_auto_create_lobby
boolean
regions
array<string>
tags
map<string, string>
verification_data
object
Response Body
lobby
object
(required)
A matchmaker lobby.
lobby.lobby_id
string
(required)
lobby.region
object
(required)
A matchmaker lobby region.
lobby.region.display_name
string
(required)
lobby.region.region_id
string
(required)
A human readable short identifier used to references resources. Different than a uuid
because this is intended to be human readable. Different than DisplayName
because this should not include special characters and be short.
player
object
(required)
A matchmaker lobby player.
player.token
string
(required)
Pass this token through the socket to the lobby server. The lobby server will validate this token with PlayerConnected.player_token
ports
map<string, object>
(required)
ports.<port>.host
string
The host for the given port. Will be null if using a port range.
ports.<port>.hostname
string
(required)
ports.<port>.is_tls
boolean
(required)
Whether or not this lobby port uses TLS. You cannot mix a non-TLS and TLS ports.
ports.<port>.port
integer
The port number for this lobby. Will be null if using a port range.
ports.<port>.port_range
object
Inclusive range of ports that can be connected to.
ports.<port>.port_range.max
integer
(required)
Maximum port that can be connected to. Inclusive range.
ports.<port>.port_range.min
integer
(required)
Minimum port that can be connected to. Inclusive range.