> ## 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.

# Request Party Service

> Request a party session.

Allowed entity token types: title, game_server

## Error codes

This operation may return the following PlayFab errors:

| Error | Code |
| --- | --- |
| PartyBadRequest | 1434 |
| PartyInternalServerError | 1439 |
| PartyNotFound | 1437 |
| PartyRequestsThrottledFromRateLimiter | 1504 |
| PartyTooManyRequests | 1441 |
| PartyUnauthorized | 1435 |
| PartyUnavailable | 1440 |




## OpenAPI

````yaml post /Party/RequestPartyService
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:
  /Party/RequestPartyService:
    post:
      tags:
        - MultiplayerServer
      summary: Request Party Service
      description: |
        Request a party session.

        Allowed entity token types: title, game_server

        ## Error codes

        This operation may return the following PlayFab errors:

        | Error | Code |
        | --- | --- |
        | PartyBadRequest | 1434 |
        | PartyInternalServerError | 1439 |
        | PartyNotFound | 1437 |
        | PartyRequestsThrottledFromRateLimiter | 1504 |
        | PartyTooManyRequests | 1441 |
        | PartyUnauthorized | 1435 |
        | PartyUnavailable | 1440 |
      operationId: RequestPartyService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestPartyServiceRequest'
        description: >-
          Requests a party session from a particular set of builds if build
          alias params is provided, in any of the given preferred regions.
      responses:
        '200':
          $ref: '#/components/responses/RequestPartyServiceResponse'
        '400':
          $ref: '#/components/responses/ApiErrorWrapper'
      security:
        - EntityToken: []
components:
  schemas:
    RequestPartyServiceRequest:
      description: >-
        Requests a party session from a particular set of builds if build alias
        params is provided, in any of the given preferred regions.
      type: object
      properties:
        CustomTags:
          description: >-
            The optional custom tags associated with the request (e.g. build
            number, external trace identifiers, etc.).
          type: object
        NetworkConfiguration:
          allOf:
            - $ref: '#/components/schemas/PartyNetworkConfiguration'
          description: The network configuration for this request.
        PartyId:
          description: >-
            A guid string party ID created track the party session over its
            life.
          type: string
        PlayFabId:
          description: A player entity Id on behalf of whom the request is being made.
          type: string
        PreferredRegions:
          description: >-
            The preferred regions to request a party session from. The party
            service will iterate through the regions in the specified order and
            allocate a party session from the first one that is available.
          type: array
          items:
            $ref: '#/components/schemas/AzureRegion'
      required:
        - PreferredRegions
        - NetworkConfiguration
      example:
        TitleId: '12345'
        PartyId: 23781fa9-e01e-4b29-4f0b-dd9f37a06a1e
        PreferredRegions:
          - EastUs
          - WestUs
        NetworkConfiguration:
          MaxUsers: 1024
          MaxDevices: 128
          MaxUsersPerDevice: 8
          MaxDevicesPerUser: 128
          MaxEndpointsPerDevice: 32
          DirectPeerConnectivityOptions: None
          PartyInvitationConfiguration:
            Identifier: f8b73a15-6ec2-48f8-b5fb-6c5946dc10be
            Revocability: Anyone
            EntityKeys: []
    PartyNetworkConfiguration:
      type: object
      properties:
        DirectPeerConnectivityOptions:
          allOf:
            - $ref: '#/components/schemas/DirectPeerConnectivityOptions'
          description: >-
            Controls whether and how to support direct peer-to-peer connection
            attempts among devices in the network.
        MaxDevices:
          description: >-
            The maximum number of devices allowed to connect to the network.
            Must be between 1 and 128, inclusive.
          type: number
          x-actualtype: uint32
        MaxDevicesPerUser:
          description: >-
            The maximum number of devices allowed per user. Must be greater than
            0.
          type: number
          x-actualtype: uint32
        MaxEndpointsPerDevice:
          description: >-
            The maximum number of endpoints allowed per device. Must be between
            0 and 32, inclusive.
          type: number
          x-actualtype: uint32
        MaxUsers:
          description: >-
            The maximum number of unique users allowed in the network. Must be
            greater than 0.
          type: number
          x-actualtype: uint32
        MaxUsersPerDevice:
          description: >-
            The maximum number of users allowed per device. Must be between 1
            and 8, inclusive.
          type: number
          x-actualtype: uint32
        PartyInvitationConfiguration:
          allOf:
            - $ref: '#/components/schemas/PartyInvitationConfiguration'
          description: >-
            An optionally-specified configuration for the initial invitation for
            this party. If not provided, default configuration values will be
            used: a title-unique invitation identifier will be generated, the
            revocability will be Anyone, and the EntityID list will be empty.
      required:
        - MaxUsers
        - MaxDevices
        - MaxUsersPerDevice
        - MaxDevicesPerUser
        - MaxEndpointsPerDevice
    AzureRegion:
      type: string
      enum:
        - AustraliaEast
        - AustraliaSoutheast
        - BrazilSouth
        - CentralUs
        - EastAsia
        - EastUs
        - EastUs2
        - JapanEast
        - JapanWest
        - NorthCentralUs
        - NorthEurope
        - SouthCentralUs
        - SoutheastAsia
        - WestEurope
        - WestUs
        - SouthAfricaNorth
        - WestCentralUs
        - KoreaCentral
        - FranceCentral
        - WestUs2
        - CentralIndia
        - UaeNorth
        - UkSouth
        - SwedenCentral
        - CanadaCentral
        - MexicoCentral
        - WestUs3
        - CanadaEast
        - UkWest
        - FranceSouth
        - SouthIndia
        - SpainCentral
        - GermanyWestCentral
        - ItalyNorth
        - IndonesiaCentral
        - ChileCentral
        - PolandCentral
        - NewZealandNorth
        - BrazilSoutheast
        - NorwayEast
        - SwitzerlandNorth
        - MalaysiaWest
        - IsraelCentral
        - QatarCentral
        - UaeCentral
        - GermanyNorth
        - AustriaEast
        - BelgiumCentral
        - DenmarkEast
        - SwitzerlandWest
        - SwedenSouth
        - NorwayWest
        - SouthAfricaWest
        - MalaysiaSouth
    RequestPartyServiceResponse:
      type: object
      properties:
        InvitationId:
          description: >-
            The invitation identifier supplied in the
            PartyInvitationConfiguration, or the PlayFab-generated guid if none
            was supplied.
          type: string
        PartyId:
          description: The guid string party ID of the party session.
          type: string
        Region:
          allOf:
            - $ref: '#/components/schemas/AzureRegion'
          description: The region the party session is located in.
        SerializedNetworkDescriptor:
          description: >-
            A base-64 encoded string containing the serialized network
            descriptor for this party.
          type: string
      example:
        SerializedNetworkDescriptor: >-
          AwCzm+YyPYt1XCGGCkeIv588A1Gon1VTV0VTVAAAAAAAAAAAAAAAAAAAt3qFc4+Pmn8bBLUynFkOvLnkJZJcbQmECJxDoCLeTxnCgRBmYWtlaG9zdG5hbWUuYml6
        InvitationId: 01234567-89ab-cdef-0123-456789abcdef
    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
    DirectPeerConnectivityOptions:
      type: string
      enum:
        - None
        - SamePlatformType
        - DifferentPlatformType
        - AnyPlatformType
        - SameEntityLoginProvider
        - DifferentEntityLoginProvider
        - AnyEntityLoginProvider
        - AnyPlatformTypeAndEntityLoginProvider
        - OnlyServers
    PartyInvitationConfiguration:
      type: object
      properties:
        EntityKeys:
          description: >-
            The list of PlayFab EntityKeys that the invitation allows to
            authenticate into the network. If this list is empty, all users are
            allowed to authenticate using the invitation's identifier. This list
            may contain no more than 1024 items.
          type: array
          items:
            $ref: '#/components/schemas/EntityKey'
          x-isclass: true
        Identifier:
          description: >-
            The invite identifier for this party. If this value is specified, it
            must be no longer than 127 characters.
          type: string
        Revocability:
          allOf:
            - $ref: '#/components/schemas/PartyInvitationRevocability'
          description: Controls which participants can revoke this invite.
    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
    PartyInvitationRevocability:
      type: string
      enum:
        - Creator
        - Anyone
  responses:
    RequestPartyServiceResponse:
      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/RequestPartyServiceResponse'
            example:
              code: 200
              status: OK
              data:
                SerializedNetworkDescriptor: >-
                  AwCzm+YyPYt1XCGGCkeIv588A1Gon1VTV0VTVAAAAAAAAAAAAAAAAAAAt3qFc4+Pmn8bBLUynFkOvLnkJZJcbQmECJxDoCLeTxnCgRBmYWtlaG9zdG5hbWUuYml6
                InvitationId: 01234567-89ab-cdef-0123-456789abcdef
    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

- [Request Party Service](/api-reference/multiplayerserver/request-party-service.md)
- [Request parties from your services with RequestPartyService](/services/playfab/multiplayer/networking/party-tutorial-requestpartyservice.md)
- [PFMultiplayerServerRequestPartyServiceResponse](/services/playfab/api-references/c/pfmultiplayerservertypes/structs/pfmultiplayerserverrequestpartyserviceresponse.md)
- [PartyXblManager::CompleteGetTokenAndSignatureRequest](/services/playfab/multiplayer/networking/xblreference/classes/PartyXblManager/methods/partyxblmanager_completegettokenandsignaturerequest.md)
- [PartyXblTokenAndSignatureRequestedStateChange](/services/playfab/multiplayer/networking/xblreference/structs/partyxbltokenandsignaturerequestedstatechange.md)
