⭐️ 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

POST
https://api.rivet.gg/matchmaker/lobbies/find
# 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.

Was this page helpful?

Edit Page

Rivet

Open-source multiplayer infrastructure. Easy, flexible, and affordable.

This website is not sponsored by or affiliated with Unity Technologies or its affiliates. Unity Trademark(s) are trademark(s) or registered trademark(s) of Unity Technologies or its affiliates in the U.S. and elsewhere. | This website is not sponsored by, affiliated with, or endorsed by Epic Games, Inc. or its affiliates. 'Unreal Engine' is a trademark or registered trademark of Epic Games, Inc. in the U.S. and elsewhere. | The HTML5 Logo by the World Wide Web Consortium (W3C), used under a Creative Commons Attribution 3.0 License. Source | The Godot Engine Logo by the Andrea Calabró, used under a Creative Commons Attribution 4.0 International License. Source | Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries. Docker, Inc. and other parties may also have trademark rights in other terms used herein.

© 2024 Rivet Gaming, Inc. All rights reserved.