Documentation

StartGame

Start a new game server with a given configuration, add the current player and return the connection information.

Request Details

This API must be enabled for use as an option in the game manager website. It is disabled by default.

StartGameRequest
Request Properties
BuildVersion (required) String

version information for the build of the game server which is to be started

CharacterId String

character to use for stats based matching. Leave null to use account stats

CustomCommandLineData String

custom command line argument when starting game server process

GameMode (required) String

the title-defined game mode this server is to be running (defaults to 0 if there is only one mode)

Region (required) Region

the region to associate this server with for match filtering

StatisticName String

player statistic for others to use in finding this game. May be null for no stat-based matching

POST https://{{TitleID}}.playfabapi.com/Client/StartGame
    Content-Type: application/json
    X-Authentication: <user_session_ticket_value>
{
  "BuildVersion": "5.01",
  "Region": "EUWest",
  "GameMode": "0",
  "CustomCommandLineData": "custom_gameserver_commandline_parameter"
}
        

Response Details

StartGameResult
Result Properties
Expires String

timestamp for when the server should expire, if applicable

LobbyID String

unique identifier for the lobby of the server started

Password String

password required to log into the server

ServerIPV4Address String

server IPV4 address

ServerIPV6Address String

server IPV6 address

ServerPort int32

port on the server to be used for communication

ServerPublicDNSName String

server public DNS name

Ticket String

unique identifier for the server

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {
    "LobbyID": "4006214",
    "ServerHostname": "103.29.85.12",
    "ServerIPV6Address": "2600:1f18:70d:5100:8949:a309:976a:e6fa",
    "ServerPort": 2019,
    "Ticket": "7D2920DE87C1D3A7-76561198047385422-3-3-8D0252520DB76F9-E6D775474D744A16.XXX",
    "Expires": "Never",
    "Password": "pa$$word"
  }
}

Authentication

SessionTicket

Possible Error Codes

Name Code
APINotEnabledForGameClientAccess 1082
BuildNotFound 1032