> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Lobby

> Get a lobby.

Allowed entity token types: title, game_server, title_player_account

## Error codes

This operation may return the following PlayFab errors:

| Error | Code |
| --- | --- |
| LobbyBadRequest | 13007 |
| LobbyDoesNotExist | 13000 |
| LobbyRateLimitExceeded | 13001 |




## OpenAPI

````yaml post /Lobby/GetLobby
openapi: 3.0.0
info:
  version: '260922'
  title: PlayFab Multiplayer API
  description: >-
    API methods for managing multiplayer servers. API methods for managing
    parties. The lobby service helps players group together to play multiplayer
    games. It is often used as a rendezvous point for players to share
    connection information. The TrueSkill service helps titles to estimate a
    player's skill based on their match results. The player skill values from
    this service are commonly used by a matchmaking service to provide players
    with balanced matches.
  termsOfService: https://playfab.com/terms/
  contact:
    url: https://community.playfab.com/index.html
  license:
    name: Apache 2.0
    url: https://github.com/PlayFab/API_Specs/blob/master/LICENSE
servers:
  - url: https://{titleId}.playfabapi.com
    description: PlayFab title endpoint
    variables:
      titleId:
        default: your_title_id
        description: Your PlayFab title ID (hex).
security: []
tags:
  - name: Lobby
    description: ''
  - name: Matchmaking
    description: Matchmaking APIs
  - name: Matchmaking Admin
    description: Matchmaking Admin APIs
  - name: MultiplayerServer
    description: Multiplayer Server APIs
  - name: PubSub
    description: PlayFab PubSub APIs
  - name: TrueSkill
    description: TrueSkill APIs
  - name: TrueSkill Admin
    description: TrueSkill Admin APIs
paths:
  /Lobby/GetLobby:
    post:
      tags:
        - Lobby
      summary: Get Lobby
      description: |
        Get a lobby.

        Allowed entity token types: title, game_server, title_player_account

        ## Error codes

        This operation may return the following PlayFab errors:

        | Error | Code |
        | --- | --- |
        | LobbyBadRequest | 13007 |
        | LobbyDoesNotExist | 13000 |
        | LobbyRateLimitExceeded | 13001 |
      operationId: GetLobby
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetLobbyRequest'
        description: Request to get a lobby.
      responses:
        '200':
          $ref: '#/components/responses/GetLobbyResult'
        '400':
          $ref: '#/components/responses/ApiErrorWrapper'
      security:
        - EntityToken: []
components:
  schemas:
    GetLobbyRequest:
      description: Request to get a lobby.
      type: object
      properties:
        CustomTags:
          description: >-
            The optional custom tags associated with the request (e.g. build
            number, external trace identifiers, etc.).
          type: object
        LobbyId:
          description: The id of the lobby.
          type: string
      example:
        LobbyId: 12345678-1234-1234-1234-123456789ABC
    GetLobbyResult:
      type: object
      properties:
        Lobby:
          allOf:
            - $ref: '#/components/schemas/Lobby'
          description: The information pertaining to the requested lobby.
      required:
        - Lobby
    ApiErrorWrapper:
      description: The basic wrapper around every failed API response
      type: object
      properties:
        code:
          description: Numerical HTTP code
          type: integer
        status:
          description: String HTTP code
          type: string
        error:
          description: Playfab error code
          type: string
        errorCode:
          description: Numerical PlayFab error code
          type: integer
        errorMessage:
          description: Description for the PlayFab errorCode
          type: string
        errorDetails:
          description: Detailed description of individual issues with the request object
          type: object
      required:
        - code
        - errorCode
    Lobby:
      type: object
      properties:
        AccessPolicy:
          allOf:
            - $ref: '#/components/schemas/AccessPolicy'
          description: >-
            A setting indicating who is allowed to join this lobby, as well as
            see it in queries.
        ChangeNumber:
          description: >-
            A number that increments once for each request that modifies the
            lobby.
          type: number
          x-actualtype: uint32
        ConnectionString:
          description: >-
            A string used to join the lobby. This field is populated by the
            Lobby service. Invites are performed by communicating this
            connectionString to other players.
          type: string
        LobbyData:
          description: Lobby data.
          type: object
        LobbyId:
          description: Id to uniquely identify a lobby.
          type: string
        MaxPlayers:
          description: The maximum number of players allowed in the lobby.
          type: number
          x-actualtype: uint32
        Members:
          description: Array of all lobby members.
          type: array
          items:
            $ref: '#/components/schemas/Member'
          x-isclass: true
        MembershipLock:
          allOf:
            - $ref: '#/components/schemas/MembershipLock'
          description: >-
            A setting indicating whether members are allowed to join this lobby.
            When Locked new members are prevented from joining.
        Owner:
          allOf:
            - $ref: '#/components/schemas/EntityKey'
          description: The client or server entity which owns this lobby.
        OwnerMigrationPolicy:
          allOf:
            - $ref: '#/components/schemas/OwnerMigrationPolicy'
          description: >-
            A setting indicating the owner migration policy. If server owned,
            this field is not present.
        PubSubConnectionHandle:
          description: >-
            An opaque string stored on a SubscribeToLobbyResource call, which
            indicates the connection an owner or member has with PubSub.
          type: string
        RestrictInvitesToLobbyOwner:
          description: >-
            A setting that controls lobby invites. When true only owners can
            invite new players, when false all members area allowed to invite.
          type: boolean
        SearchData:
          description: Search data.
          type: object
        Server:
          allOf:
            - $ref: '#/components/schemas/LobbyServer'
          description: >-
            Preview: Lobby joined server. This is not the server owner, rather
            the server that has joined a client owned lobby.
        UseConnections:
          description: >-
            A flag which determines if connections are used. Defaults to true.
            Only set on create.
          type: boolean
      required:
        - LobbyId
        - ChangeNumber
        - MaxPlayers
        - UseConnections
        - AccessPolicy
        - MembershipLock
        - ConnectionString
        - RestrictInvitesToLobbyOwner
    AccessPolicy:
      type: string
      enum:
        - Public
        - Friends
        - Private
    Member:
      type: object
      properties:
        MemberData:
          description: Key-value pairs specific to member.
          type: object
        MemberEntity:
          allOf:
            - $ref: '#/components/schemas/EntityKey'
          description: The member entity key.
        PubSubConnectionHandle:
          description: >-
            Opaque string, stored on a Subscribe call, which indicates the
            connection an owner or member has with PubSub.
          type: string
    MembershipLock:
      type: string
      enum:
        - Unlocked
        - Locked
    EntityKey:
      description: >-
        Combined entity type and ID structure which uniquely identifies a single
        entity.
      type: object
      properties:
        Id:
          description: Unique ID of the entity.
          type: string
        Type:
          description: >-
            Entity type. See
            https://learn.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types
          type: string
      required:
        - Id
    OwnerMigrationPolicy:
      type: string
      enum:
        - None
        - Automatic
        - Manual
        - Server
    LobbyServer:
      type: object
      properties:
        PubSubConnectionHandle:
          description: >-
            Opaque string, stored on a Subscribe call, which indicates the
            connection a joined server has with PubSub.
          type: string
        ServerData:
          description: Key-value pairs specific to the joined server.
          type: object
        ServerEntity:
          allOf:
            - $ref: '#/components/schemas/EntityKey'
          description: The server entity key.
  responses:
    GetLobbyResult:
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                description: >-
                  The Http status code. If X-ReportErrorAsSuccess header is set
                  to true, this will report the actual http error code.
              status:
                type: string
                description: The Http status code as a string.
              data:
                $ref: '#/components/schemas/GetLobbyResult'
    ApiErrorWrapper:
      description: This is the outer wrapper for all responses with errors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorWrapper'
  securitySchemes:
    EntityToken:
      type: apiKey
      in: header
      name: X-EntityToken
      description: >-
        This API requires an Entity Session Token, available from the Entity
        GetEntityToken method.

````

## Related topics

- [Get Lobby](/api-reference/lobby/get-lobby.md)
- [Lobby](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/Lobby/overview.md)
- [Lobby.GetLobbyProperties](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/Lobby/GetLobbyProperties.md)
- [PFLobbyGetLobbyId](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbygetlobbyid.md)
- [PFLobbyGetLobbyProperty](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbygetlobbyproperty.md)
