次の方法で共有


Lobby - Join Arranged Lobby

Join an Arranged lobby.

POST https://titleId.playfabapi.com/Lobby/JoinArrangedLobby

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
ArrangementString True

string

A field which indicates which lobby the user will be joining. This field is opaque to everyone except the Lobby service and the creator of the arrangementString (Matchmaking). This string defines a unique identifier for the arranged lobby as well as the title and member the string is valid for. Arrangement strings have an expiration.

MaxPlayers True

number

The maximum number of players allowed in the lobby. The value must be between 2 and 128.

MemberEntity True

EntityKey

The member entity who is joining the lobby. The first member to join will be the lobby owner.

UseConnections True

boolean

A setting to control whether connections are used. Defaults to true. When true, notifications are sent to subscribed players, disconnect detection removes connectionHandles, only owner migration policies using connections are allowed, and lobbies must have at least one connected member to be searchable or be a server hosted lobby with a connected server. If false, then notifications are not sent, connections are not allowed, and lobbies do not need connections to be searchable.

AccessPolicy

AccessPolicy

The policy indicating who is allowed to join the lobby, and the visibility to queries. May be 'Public', 'Friends' or 'Private'. Public means the lobby is both visible in queries and any player may join, including invited players. Friends means that users who are bidirectional friends of members in the lobby may search to find friend lobbies, to retrieve its connection string. Private means the lobby is not visible in queries, and a player must receive an invitation to join. Defaults to 'Public' on creation. Can only be changed by the lobby owner.

CustomTags

object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

MemberData

object

The private key-value pairs used by the member to communicate information to other members and the owner. Visible to all entities in the lobby. 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 memberData values may not exceed 4096 bytes. Keys are case sensitive.

OwnerMigrationPolicy

OwnerMigrationPolicy

The policy for how a new owner is chosen. May be 'Automatic', 'Manual' or 'None'. Can only be specified by clients. If client-owned and 'Automatic' - The Lobby service will automatically assign another connected owner when the current owner leaves or disconnects. The useConnections property must be true. If client - owned and 'Manual' - Ownership is protected as long as the current owner is connected. If the current owner leaves or disconnects any member may set themselves as the current owner. The useConnections property must be true. If client-owned and 'None' - Any member can set ownership. The useConnections property can be either true or false.

Responses

Name Type Description
200 OK

JoinLobbyResult

400 Bad Request

ApiErrorWrapper

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
AccessPolicy
ApiErrorWrapper

The basic wrapper around every failed API response

EntityKey

Combined entity type and ID structure which uniquely identifies a single entity.

JoinArrangedLobbyRequest

Request to join an arranged lobby. Only a client can join an arranged lobby.

JoinLobbyResult
OwnerMigrationPolicy

AccessPolicy

Name Type Description
Friends

string

Private

string

Public

string

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

JoinArrangedLobbyRequest

Request to join an arranged lobby. Only a client can join an arranged lobby.

Name Type Description
AccessPolicy

AccessPolicy

The policy indicating who is allowed to join the lobby, and the visibility to queries. May be 'Public', 'Friends' or 'Private'. Public means the lobby is both visible in queries and any player may join, including invited players. Friends means that users who are bidirectional friends of members in the lobby may search to find friend lobbies, to retrieve its connection string. Private means the lobby is not visible in queries, and a player must receive an invitation to join. Defaults to 'Public' on creation. Can only be changed by the lobby owner.

ArrangementString

string

A field which indicates which lobby the user will be joining. This field is opaque to everyone except the Lobby service and the creator of the arrangementString (Matchmaking). This string defines a unique identifier for the arranged lobby as well as the title and member the string is valid for. Arrangement strings have an expiration.

CustomTags

object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

MaxPlayers

number

The maximum number of players allowed in the lobby. The value must be between 2 and 128.

MemberData

object

The private key-value pairs used by the member to communicate information to other members and the owner. Visible to all entities in the lobby. 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 memberData values may not exceed 4096 bytes. Keys are case sensitive.

MemberEntity

EntityKey

The member entity who is joining the lobby. The first member to join will be the lobby owner.

OwnerMigrationPolicy

OwnerMigrationPolicy

The policy for how a new owner is chosen. May be 'Automatic', 'Manual' or 'None'. Can only be specified by clients. If client-owned and 'Automatic' - The Lobby service will automatically assign another connected owner when the current owner leaves or disconnects. The useConnections property must be true. If client - owned and 'Manual' - Ownership is protected as long as the current owner is connected. If the current owner leaves or disconnects any member may set themselves as the current owner. The useConnections property must be true. If client-owned and 'None' - Any member can set ownership. The useConnections property can be either true or false.

UseConnections

boolean

A setting to control whether connections are used. Defaults to true. When true, notifications are sent to subscribed players, disconnect detection removes connectionHandles, only owner migration policies using connections are allowed, and lobbies must have at least one connected member to be searchable or be a server hosted lobby with a connected server. If false, then notifications are not sent, connections are not allowed, and lobbies do not need connections to be searchable.

JoinLobbyResult

Name Type Description
LobbyId

string

Successfully joined lobby's id.

OwnerMigrationPolicy

Name Type Description
Automatic

string

Manual

string

None

string

Server

string

Error Codes

Name Code
LobbyBadRequest 13007
LobbyMemberCannotRejoin 13004
LobbyNotJoinable 13003
LobbyPlayerAlreadyJoined 13002
LobbyPlayerMaxLobbyLimitExceeded 13008
LobbyRateLimitExceeded 13001