Multiplayer Server - Request Multiplayer Server

Request a multiplayer server session. Accepts tokens for title and if game client access is enabled, allows game client to request a server with player entity token.

POST https://titleId.playfabapi.com/MultiplayerServer/RequestMultiplayerServer

Request Body

Name Required Type Description
BuildAliasParams

The identifiers of the build alias to use for the request.

BuildId
  • string

The guid string build ID of the multiplayer server to request.

InitialPlayers
  • string[]

Initial list of players (potentially matchmade) allowed to connect to the game. This list is passed to the game server when requested (via GSDK) and can be used to validate players connecting to it.

PreferredRegions True
  • object[]

The preferred regions to request a multiplayer server from. The Multiplayer Service will iterate through the regions in the specified order and allocate a server from the first one that has servers available.

SessionCookie
  • string

Data encoded as a string that is passed to the game server when requested. This can be used to to communicate information such as game mode or map through the request flow.

SessionId True
  • string

A guid string session ID created track the multiplayer server session over its life.

Responses

Name Type Description
200 OK
400 Bad Request

This is the outer-wrapper for all responses with errors

Security

EntityToken

This API requires an Entity Session Token, available from the Entity GetEntityToken method.

Type: apiKey
In: header

Definitions

ApiErrorWrapper

The basic wrapper around every failed API response

AzureRegion
BuildAliasParams
ConnectedPlayer
Port
ProtocolType
RequestMultiplayerServerRequest

Requests a multiplayer server session from a particular build in any of the given preferred regions.

RequestMultiplayerServerResponse

ApiErrorWrapper

The basic wrapper around every failed API response

Name Type Description
code
  • number

Numerical HTTP code

error
  • string

Playfab error code

errorCode
  • number

Numerical Playfab error code

errorDetails
  • object

Detailed description of individual issues with the request object

errorMessage
  • string

Description for the Playfab errorCode

status
  • string

String HTTP code

AzureRegion

Name Type Description
AustraliaEast
  • string
AustraliaSoutheast
  • string
BrazilSouth
  • string
CentralUs
  • string
ChinaEast2
  • string
ChinaNorth2
  • string
EastAsia
  • string
EastUs
  • string
EastUs2
  • string
JapanEast
  • string
JapanWest
  • string
NorthCentralUs
  • string
NorthEurope
  • string
SouthAfricaNorth
  • string
SouthCentralUs
  • string
SoutheastAsia
  • string
WestEurope
  • string
WestUs
  • string

BuildAliasParams

Name Type Description
AliasId
  • string

The guid string alias ID to use for the request.

ConnectedPlayer

Name Type Description
PlayerId
  • string

The player ID of the player connected to the multiplayer server.

Port

Name Type Description
Name
  • string

The name for the port.

Num
  • number

The number for the port.

Protocol

The protocol for the port.

ProtocolType

Name Type Description
TCP
  • string
UDP
  • string

RequestMultiplayerServerRequest

Requests a multiplayer server session from a particular build in any of the given preferred regions.

Name Type Description
BuildAliasParams

The identifiers of the build alias to use for the request.

BuildId
  • string

The guid string build ID of the multiplayer server to request.

InitialPlayers
  • string[]

Initial list of players (potentially matchmade) allowed to connect to the game. This list is passed to the game server when requested (via GSDK) and can be used to validate players connecting to it.

PreferredRegions
  • object[]

The preferred regions to request a multiplayer server from. The Multiplayer Service will iterate through the regions in the specified order and allocate a server from the first one that has servers available.

SessionCookie
  • string

Data encoded as a string that is passed to the game server when requested. This can be used to to communicate information such as game mode or map through the request flow.

SessionId
  • string

A guid string session ID created track the multiplayer server session over its life.

RequestMultiplayerServerResponse

Name Type Description
ConnectedPlayers

The connected players in the multiplayer server.

FQDN
  • string

The fully qualified domain name of the virtual machine that is hosting this multiplayer server.

IPV4Address
  • string

The IPv4 address of the virtual machine that is hosting this multiplayer server.

LastStateTransitionTime
  • string

The time (UTC) at which a change in the multiplayer server state was observed.

Ports

The ports the multiplayer server uses.

Region

The region the multiplayer server is located in.

ServerId
  • string

The string server ID of the multiplayer server generated by PlayFab.

SessionId
  • string

The guid string session ID of the multiplayer server.

State
  • string

The state of the multiplayer server.

VmId
  • string

The virtual machine ID that the multiplayer server is located on.

Error Codes

Name Code
APINotEnabledForGameClientAccess 1082
MultiplayerServerBadRequest 1382
MultiplayerServerForbidden 1384
MultiplayerServerInternalServerError 1387
MultiplayerServerNotFound 1385
MultiplayerServerTooManyRequests 1380
MultiplayerServerUnauthorized 1383
MultiplayerServerUnavailable 1388