Lobby - Join Lobby As Server
Preview: Join a lobby as a server entity. This is restricted to client lobbies which are using connections.
POST https://titleId.playfabapi.com/Lobby/JoinLobbyAsServer
Request Header
Name | Required | Type | Description |
---|---|---|---|
X-EntityToken | True |
string |
This API requires an Entity Session Token, available from the Entity GetEntityToken method. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
ConnectionString | True |
string |
A field which indicates which lobby the game_server will be joining. This field is opaque to everyone except the Lobby service. |
ServerEntity | True |
The game_server entity which is joining the Lobby. If a different game_server entity has already joined the request will fail unless the joined entity is disconnected, in which case the incoming game_server entity will replace the disconnected entity. |
|
CustomTags |
object |
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). |
|
ServerData |
object |
The private key-value pairs which are visible to all entities in the lobby but can only be modified by the joined server.At most 30 key - value pairs may be stored here, keys are limited to 30 characters and values to 1000.The total size of all serverData values may not exceed 4096 bytes. |
Responses
Name | Type | Description |
---|---|---|
200 OK | ||
400 Bad Request |
This is the outer wrapper for all responses with errors |
Security
X-EntityToken
This API requires an Entity Session Token, available from the Entity GetEntityToken method.
Type:
apiKey
In:
header
Definitions
Name | Description |
---|---|
Api |
The basic wrapper around every failed API response |
Entity |
Combined entity type and ID structure which uniquely identifies a single entity. |
Join |
Preview: Request to join a lobby as a server. Only callable by a game_server entity and this is restricted to client owned lobbies which are using connections. |
Join |
ApiErrorWrapper
The basic wrapper around every failed API response
Name | Type | Description |
---|---|---|
code |
integer |
Numerical HTTP code |
error |
string |
Playfab error code |
errorCode |
integer |
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 |
EntityKey
Combined entity type and ID structure which uniquely identifies a single entity.
Name | Type | Description |
---|---|---|
Id |
string |
Unique ID of the entity. |
Type |
string |
Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types |
JoinLobbyAsServerRequest
Preview: Request to join a lobby as a server. Only callable by a game_server entity and this is restricted to client owned lobbies which are using connections.
Name | Type | Description |
---|---|---|
ConnectionString |
string |
A field which indicates which lobby the game_server will be joining. This field is opaque to everyone except the Lobby service. |
CustomTags |
object |
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). |
ServerData |
object |
The private key-value pairs which are visible to all entities in the lobby but can only be modified by the joined server.At most 30 key - value pairs may be stored here, keys are limited to 30 characters and values to 1000.The total size of all serverData values may not exceed 4096 bytes. |
ServerEntity |
The game_server entity which is joining the Lobby. If a different game_server entity has already joined the request will fail unless the joined entity is disconnected, in which case the incoming game_server entity will replace the disconnected entity. |
JoinLobbyAsServerResult
Name | Type | Description |
---|---|---|
LobbyId |
string |
Successfully joined lobby's id. |
Error Codes
Name | Code |
---|---|
LobbyBadRequest | 13007 |
LobbyDifferentServerAlreadyJoined | 13014 |
LobbyDoesNotExist | 13000 |
LobbyDoesNotUseConnections | 13017 |
LobbyIsNotClientOwned | 13016 |
LobbyRateLimitExceeded | 13001 |
LobbyServerAlreadyJoined | 13015 |