Overview
Lobbies are groups of users that can communicate via text and voice. This guide will show you how to:- Create and manage lobbies
- Handle lobby membership
- Send and receive messages in lobbies
- Retrieve chat history
Prerequisites
Before you begin:- Set up the Discord Social SDK using the Getting Started guide
Lobby features
Lobbies are groups of users that can communicate via text and voice. Users can be in multiple lobbies at once. A lobby can also have metadata (an arbitrary JSON blob) associated with the lobby and each user.Lobby limits
- Maximum members: 1,000 per lobby
- Maximum lobbies per user per game: 100
- Voice calls: Recommended maximum of 25 participants for optimal performance
Contact Developer Support if you need more than 1,000 members in a lobby or more than 25 participants in a voice call.
Text chat
All lobby members can send and receive messages in the lobby’s text channel.Voice chat
Lobbies support voice calls. While lobbies technically support 1,000 members, keep voice calls to 25 members or fewer for best performance.Managing lobbies
There are two ways to manage lobbies: from your server using the Discord HTTP API, or from the client using the SDK.Server-side lobby management
Use the Discord HTTP API to create, update, and delete lobbies and manage membership. See the Lobby API resource for available endpoints and Use with Discord APIs for authentication details.Clients cannot use
Client::CreateOrJoinLobby or Client::LeaveLobby with lobbies created using the server-side API.Client-side lobby management
The SDK creates and joins lobbies using a shared lobby secret. Anyone with the secret can join the lobby. If no lobby with that secret exists, a new one is created automatically.- Lobby secrets are unique per game (application). Use a new secret to generate a new lobby for each match.
- Calling
Client::LeaveLobbythenClient::CreateOrJoinLobbywith the same secret re-adds you to the same lobby. - Calling
Client::CreateOrJoinLobbywhile already in a lobby updates your metadata (if included). - The lobby secret can be embedded in rich presence to support game invite flows. See Creating lobby invites below.
Leaving a lobby
Client::CreateOrJoinLobby can be left using Client::LeaveLobby.
Lobby lifecycle
Lobbies are ephemeral and support automatic cleanup via a max idle time. If a lobby has no connected members for longer than the idle time, it is automatically deleted. As long as at least one person is connected, the lobby persists and the timer resets.- Default idle time: 5 minutes
- Maximum idle time: 7 days
Lobby secrets used with
Client::CreateOrJoinLobby expire after 30 days. The lobby still exists after expiry, but new users cannot join using that secret.Sending messages to a lobby
Send a text message to all lobby members:Receiving lobby messages
Register a callback to receive new messages from lobbies and DMs:messageId you can fetch the MessageHandle and then the ChannelHandle to determine where the message was sent.
Getting lobby chat history
Retrieve previous messages from a lobby usingClient::GetLobbyMessagesWithLimit:
- Maximum of 200 messages per request
- Maximum of 72 hours of history
- Only messages from lobbies the user is currently a member of can be retrieved
MessageHandle objects in chronological order (oldest first). Each handle contains the message content, author information, and timestamp.
Linking a channel to a lobby
Connect a lobby to a Discord text channel using Linked Channels. This allows users to chat in Discord even when they’re not in the game. See the Linked Channels guide for implementation details.Creating lobby invites
Use rich presence to allow players to invite friends to an existing lobby. Set the join secret in your rich presence to the lobby secret, then handle incoming invite acceptances to join the lobby. See the [Managing Game Invites guide](/developers/discord-social-sdk/development-guides/managing-lobbiesVoice chat in lobbies
Voice calls in lobbies are covered in the Managing Voice Chat guide.Next steps
Managing voice chat
Add voice communication to your lobbies.
Managing game invites
Allow players to invite friends to join their game session or party.
Linked channels
Connect lobbies to Discord text channels.
Change log
| Date | Changes |
|---|---|
| June 30, 2025 | Add communications scope warning |
| March 17, 2025 | Initial release |