Documentation

RegisterGame

Inform the matchmaker that a new Game Server Instance is added.

Request Details

RegisterGameRequest
Request Properties
Build (required) String

Unique identifier of the build running on the Game Server Instance.

GameMode (required) String

Game Mode the Game Server instance is running. Note that this must be defined in the Game Modes tab in the PlayFab Game Manager, along with the Build ID (the same Game Mode can be defined for multiple Build IDs).

LobbyId String

Previous lobby id if re-registering an existing game.

Region (required) Region

Region in which the Game Server Instance is running. For matchmaking using non-AWS region names, set this to any AWS region and use Tags (below) to specify your custom region.

ServerIPV4Address String

IPV4 address of the game server instance.

ServerIPV6Address String

IPV6 address (if any) of the game server instance.

ServerPort (required) String

Port number for communication with the Game Server Instance.

ServerPublicDNSName String

Public DNS name (if any) of the server

Tags Dict<String, String>

Tags for the Game Server Instance

POST https://{{TitleID}}.playfabapi.com/Server/RegisterGame
    Content-Type: application/json
    X-SecretKey: <developer_secret_key>
{
  "ServerHost": "118.129.31.244",
  "ServerPort": "9984",
  "Build": "11_034234.13",
  "Region": "USEast",
  "GameMode": "FreeForAll",
  "Tags": {
    "level_cap": "high",
    "no_smoking": "1"
  }
}
        

Response Details

RegisterGameResponse
Result Properties
LobbyId String

Unique identifier generated for the Game Server Instance that is registered. If LobbyId is specified in request and the game still exists in PlayFab, the LobbyId in request is returned. Otherwise a new lobby id will be returned.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {
    "LobbyId": "8285313"
  }
}

Authentication

SecretKey

Possible Error Codes

Name Code
InvalidRequest 1071