Documentation

​
​

Development

User Acquisition

Monetization

Industry

Multiplayer Services SDK

All Services

Multiplayer Services SDK

Multiplayer
​
​
Multiplayer Services SDK
  • Overview
  • Get started
  • Use multiplayer sessions
    • Integrate Multiplayer sessions
      • Initialize UGS and authenticate the player
      • Create a session
      • Create sessions in the Editor
      • Find and join a session
      • Matchmaking
      • Migrate session host
      • Leave a session
      • Get a list of joined sessions
      • Delete a session
      • Session configuration options
    • Game server hosting support
  • Manage sessions
  • Connect players through a relay
  • Networking
  • Matchmaking
  • Monitor and debug sessions
  • Tutorials
  • Reference
  1. Multiplayer Services SDK

Get joined sessions

Retrieve a list of all sessions that the current player has joined.
Read time 1 minute
Last updated 3 months ago

If players need to determine their current session membership, they can use the GetJoinedSessionIds API. This API returns a list of session IDs for the lobbies that the active player is currently a member of.
One common use for GetJoinedSessionIds is handling unexpected disconnects. If a game crashes or the user disconnects from a session for any reason, you can use this API to get a list of all sessions a player is a member of and then use the GetSession API to retrieve the full session details or Reconnect to a session.
Note
You can't get a private lobby unless you're a member of the lobby.
The following code sample shows how to get a player’s joined sessions:
using Unity.Services.Multiplayer;using UnityEngine;// ...try{ // Fetches a list of all session IDs the current authenticated user is a part of var sessionIds = await MultiplayerService.Instance.GetJoinedSessionIdsAsync();}catch (SessionException e){ // Multiplayer Services uses SessionException for API errors Debug.Log(e);}

Copyright © 2026 Unity Technologies
LegalPrivacy PolicyCookiesDocumentation Terms of UseDo Not Sell or Share My Personal InformationYour Privacy Choices (Cookie Settings)

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S and elsewhere (more info here). Other names or brands are trademarks of their respective owners.

Some pages are machine-translated for convenience, and may contain inaccuracies. In the event of conflicting information, the English version is authoritative.


    Report a problem with this page