Static addAdd or update a favorite/history server entry for a player.
Provide server_id for a registered Glitch server, or host plus
game_port for a direct/community server. Lifecycle event:
favorite.upserted.
Title UUID.
Favorite/history target and optional metadata.
Static browseBrowse public, joinable multiplayer servers for a title.
Default results exclude private, draining, offline, stale, expired, and full
servers. Title administrators can pass include_private to inspect servers
that normal clients cannot join.
Title UUID.
Optional params: MultiplayerServerBrowserParamsOptional server browser filters.
Static createCreate a lobby and insert the owner as the first joined member.
Use this when matchmaking has no suitable lobby, when a player invites
friends, or when a party needs pre-game setup before server assignment.
Lifecycle events: lobby.created, then lobby.joined for the owner.
Title UUID.
Lobby configuration and optional owner/member metadata.
Multiplayer.createLobby('title-uuid', {
player_id: 'steam:76561198000000000',
display_name: 'CinderAce',
lobby_type: 'public',
max_members: 4,
region: 'us-central',
game_mode: 'ranked_duos',
metadata: { playlist: 'ranked', allow_voice: true }
});
Static createCreate a voice room and join the creator as the first participant.
The backend returns voice_token once. Keep it client-side and use it for
voice heartbeat, packet send, packet polling, and leave calls. glitch_relay
can carry base64 Opus frames for prototypes, small-party fallback, or
signaling. For production-scale audio, set provider: 'external' and reuse
the room/token contract with WebRTC, an SFU, Vivox, Steam Networking, or an
engine-native transport. Lifecycle events: voice.room_created,
voice.joined.
Title UUID.
Voice codec, topology, linked lobby/server, and owner metadata.
const { data } = await Multiplayer.createVoiceRoom('title-uuid', {
player_id: 'steam:76561198000000000',
display_name: 'CinderAce',
lobby_id: 'lobby-uuid',
provider: 'glitch_relay',
topology: 'lobby',
codec: 'opus',
sample_rate: 48000,
frame_duration_ms: 20,
channels: 1,
metadata: { push_to_talk: true }
});
Static deleteDelete a player's favorite/history server entry.
The SDK sends optional player_id as a query parameter because the shared
request helper treats DELETE payloads as query params. This maps cleanly to
the backend's optional player identity validation for title-token clients.
Lifecycle event: favorite.deleted.
Title UUID.
Favorite/history UUID.
Optional params: MultiplayerDeleteFavoriteParamsOptional player_id for title-token clients.
Static heartbeatHeartbeat a multiplayer server with its dedicated server_token.
Call every 30-60 seconds and whenever player counts, rules, or metadata
change. Stale servers are hidden from default browsing and reservation.
This endpoint is for dedicated/listen server processes and does not require
a user JWT. Lifecycle event: server.heartbeat.
Title UUID.
Server UUID.
Server token and optional mutable server state.
Static heartbeatHeartbeat an open multiplayer session reservation.
Use this after a successful reservation while the client is connecting or
playing. Expired sessions are marked expired and capacity is recovered before
the backend returns 409. Lifecycle events: session.heartbeat or
session.expired.
Reservation token and optional state/TTL.
Static heartbeatHeartbeat voice participant state.
Call every 10-30 seconds and whenever mute/deafen/speaking state changes.
last_sequence tells the backend how far this participant has processed
ordered packets. Expired participants are rejected with 409. Lifecycle event:
voice.heartbeat.
Participant voice token and mutable media state.
Static issueIssue a short-lived multiplayer auth ticket for a player.
The plain auth_ticket is returned once and only a hash is stored by the
backend. Use this for P2P or dedicated-server admission before game traffic
begins. remote_identity can bind the ticket to a server or validator.
Lifecycle event: auth_ticket.issued.
Title UUID.
Optional data: MultiplayerIssueAuthTicketRequestPlayer identity, optional remote identity, and TTL.
Static joinJoin a lobby or refresh an existing membership.
This call is idempotent for a player already in the lobby and can update
display name, ready state, or member metadata. It returns 409 when the lobby
is full, closed, expired, or not joinable. Lifecycle event: lobby.joined.
Title UUID.
Lobby UUID.
Player identity and optional member metadata.
Multiplayer.joinLobby('title-uuid', 'lobby-uuid', {
player_id: 'steam:76561198000000001',
display_name: 'Nova',
ready: false,
member_data: { character: 'Ash', rank: 1799 }
});
Static joinJoin a voice room and receive a participant-scoped token.
Rejoining with the same player is idempotent and rotates the token. The
token is used by participant endpoints instead of requiring a user JWT or
title token on every media request. Returns 409 when the room is closed,
expired, or full. Lifecycle event: voice.joined.
Title UUID.
Voice room UUID.
Player identity, display name, metadata, and token TTL.
Static leaveLeave a lobby.
If the owner leaves, ownership transfers to the oldest remaining joined
member. If no members remain, the lobby closes. Lifecycle events:
lobby.left, optionally lobby.owner_transferred or lobby.updated.
Title UUID.
Lobby UUID.
Optional data: MultiplayerLeaveLobbyRequestOptional player_id for title-token clients.
Static leaveLeave the current voice room for a participant token.
This is idempotent for disconnect cleanup: room participant count is
decremented once, room ownership is transferred when possible, and an
empty room closes. The token remains valid only for retrying this leave
call; heartbeat, send, and poll calls reject left participants. Lifecycle
event: voice.left.
Participant voice token.
Static listList a player's server favorites or history entries.
Use this for Steam-like favorites and recent servers tabs. Title-token
clients should pass player_id; user JWT clients default to the user UUID.
Title UUID.
Optional params: MultiplayerFavoritesParamsOptional player and favorite/history filter.
Static listList ordered low-bandwidth lobby messages.
Use after_sequence to poll for messages missed during reconnects or after
a realtime lobby.message_sent event. This channel is for chat and control
messages, not gameplay, positional data, or voice streaming.
Title UUID.
Lobby UUID.
Optional params: MultiplayerLobbyMessagesParamsOptional sequence cursor and limit.
Static listList active/non-expired voice rooms for a title.
Rooms can be attached to a lobby, a server, a party, or a proximity group.
Use this to discover existing voice state before joining. Lifecycle context:
realtime transports should mirror voice.room_created, voice.room_updated,
voice.joined, and voice.left.
Title UUID.
Optional params: MultiplayerVoiceRoomListParamsOptional room filters such as lobby_id, server_id, provider, topology, state, region, and limit.
Static pollPoll ordered voice-room packets after a known sequence.
Defaults to excluding packets sent by the caller. Use the highest returned
sequence as the next after_sequence cursor. This is useful for fallback
relay, WebRTC signaling, reconnect recovery, and small-party prototypes.
Lifecycle event: voice.packet_polled.
Participant token, optional sequence cursor, limit, and self-exclusion flag.
Static registerRegister or refresh a multiplayer server and receive a one-time server token.
Store server_token only on the server process. The backend stores only a
hash and will not return the plain token again. Counts are validated so
current_players + bot_players cannot exceed max_players. Lifecycle event:
server.registered.
Title UUID.
Server browser, connection, rule, and capacity metadata.
Multiplayer.registerServer('title-uuid', {
name: 'Ranked US Central 01',
server_type: 'dedicated',
status: 'active',
host: '203.0.113.42',
game_port: 7777,
query_port: 27015,
transport: 'udp',
max_players: 16,
secure: true,
tags: ['ranked', 'duos']
});
Static releaseRelease an open multiplayer session reservation.
Call this on normal disconnect, failed connection attempts, or shutdown so
server capacity is decremented promptly. The backend makes release safe to
call more than once for an already closed reservation. Lifecycle event:
session.released.
Reservation token returned by reserveServer.
Static reserveReserve a short-lived slot on a multiplayer server before connecting.
Reservations protect capacity during game handoff. The backend rejects stale,
private, full, draining, offline, expired, or duplicate open reservations.
The plain reservation_token is returned once and is used for session
heartbeat/release calls. Lifecycle event: server.reserved.
Title UUID.
Server UUID.
Optional data: MultiplayerReserveServerRequestOptional player/lobby identity and reservation TTL.
Static searchSearch joinable, non-expired lobbies for a title.
Filters are exact-match except skill_band, which the backend can use for
near sorting. Default results exclude full, closed, unjoinable, and expired
lobbies. Lifecycle context: clients usually call this before joinLobby;
joins create a lobby.joined event on the backend.
Title UUID.
Optional params: MultiplayerLobbySearchParamsOptional filters such as region, game mode, map, lobby type, skill band, and limit.
Multiplayer.searchLobbies('title-uuid', {
region: 'us-central',
game_mode: 'ranked_duos',
skill_band: 1840,
limit: 25
});
Static sendSend a low-bandwidth message to all lobby members.
Payloads are capped at 4KB by the backend. Use this for chat, ready signals,
invite/kick control messages, and owner-arbitrated choices. Lifecycle event:
lobby.message_sent.
Title UUID.
Lobby UUID.
Message type, sender identity, and JSON payload.
Multiplayer.sendLobbyMessage('title-uuid', 'lobby-uuid', {
player_id: 'steam:76561198000000000',
message_type: 'ready',
payload: { ready: true }
});
Static sendSend one ordered voice-room packet.
audio packets should contain compact compressed frames such as base64 Opus
at 48kHz mono/20ms. offer, answer, and ice packets support WebRTC
signaling. control, speaking, and mute_state packets are for custom
engine state. Audio payloads are capped at 16KB; non-audio packets at 4KB.
Muted participants cannot send audio. Lifecycle event: voice.packet_sent.
Participant token, packet type, payload, and optional duration.
await Multiplayer.sendVoicePacket({
voice_token: voiceToken,
packet_type: 'audio',
payload: base64OpusFrame,
duration_ms: 20
});
Static setAssign a registered game server to a lobby.
This owner-only handoff mirrors Steam's SetLobbyGameServer flow. Clients
should react by reserving or connecting to the assigned server, then
optionally leaving the lobby. Lifecycle event: lobby.server_assigned.
Title UUID.
Lobby UUID.
Server UUID and optional lobby state/joinability updates.
Static showRetrieve a lobby with members and assigned server information when present.
Call this after lobby lifecycle notifications such as lobby.joined,
lobby.updated, lobby.owner_transferred, or lobby.server_assigned.
Title UUID.
Lobby UUID.
Static showRetrieve a voice room with participant media states.
Use this after voice.joined, voice.heartbeat, voice.left, or
voice.room_updated to refresh in-game UI such as speaker lists, mute
icons, or team voice controls.
Title UUID.
Voice room UUID.
Static updateUpdate lobby metadata, visibility, joinability, limits, or state.
This is owner-only. max_members cannot be lower than the current member
count. Keep metadata low-frequency and mostly search/display oriented.
Lifecycle event: lobby.updated.
Title UUID.
Lobby UUID.
Owner identity plus fields to update.
Static updateUpdate owner-controlled voice room state.
Owner-only. Use this to close a room, adjust capacity, update moderation
flags, or provide external provider connection details. The backend rejects
lowering max_participants below the current participant count. Lifecycle
event: voice.room_updated.
Title UUID.
Voice room UUID.
Owner player identity and room fields to update.
Static validateValidate a multiplayer auth ticket from a trusted title/user context.
Pass consume: true for one-time tickets to prevent replay. Dedicated
servers should usually call validateAuthTicketForServer so they can use
server_token instead of a title token or user JWT. Lifecycle event:
auth_ticket.validated.
Title UUID.
Ticket, optional remote identity check, and consume flag.
Static validateValidate an auth ticket as a dedicated server.
This server-token endpoint lets a dedicated server admit players without
holding a user JWT or title token. Pass consume: true to prevent replay.
Lifecycle event: auth_ticket.validated.
Title UUID.
Server UUID.
Server token, player auth ticket, optional remote identity, and consume flag.
Generated using TypeDoc
Steam-style multiplayer APIs for Glitch titles.
The multiplayer surface is split into three groups: lobby coordination, voice coordination, server browser/reservations, and short-lived auth tickets. User JWTs can infer the player from the authenticated user. Title-token clients and game clients without a Glitch user session should pass a stable
player_id. Dedicated servers useserver_tokenon heartbeat and server-side ticket validation so they do not need to hold a user JWT or title token.These endpoints are intentionally database-agnostic from the SDK's point of view: callers work with public identifiers, metadata objects, and lifecycle events, while the backend owns how those records are stored.