Create a turn-based match. Try it now.
Request
HTTP request
POST https://www.googleapis.com/games/v1/turnbasedmatches/create
Parameters
Parameter name | Value | Description |
---|---|---|
Optional query parameters | ||
language |
string |
The preferred language to use for strings returned by this method. |
Authorization
This request requires authorization with the following scope:
Scope |
---|
https://www.googleapis.com/auth/games |
For more information, see the authentication and authorization page.
Request body
In the request body, supply data with the following structure:
{ "kind": "games#turnBasedMatchCreateRequest", "variant": integer, "invitedPlayerIds": [ string ], "autoMatchingCriteria": { "kind": "games#turnBasedAutoMatchingCriteria", "minAutoMatchingPlayers": integer, "maxAutoMatchingPlayers": integer, "exclusiveBitmask": long }, "requestId": long }
Property name | Value | Description | Notes |
---|---|---|---|
kind |
string |
Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchCreateRequest . |
|
variant |
integer |
The variant / mode of the application to be played. This can be any integer value, or left blank. You should use a small number of variants to keep the auto-matching pool as large as possible. | |
invitedPlayerIds[] |
list |
The player ids to invite to the match. | |
autoMatchingCriteria |
nested object |
Criteria for auto-matching players into this match. | |
autoMatchingCriteria.kind |
string |
Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria . |
|
autoMatchingCriteria.minAutoMatchingPlayers |
integer |
The minimum number of players that should be added to the match by auto-matching. | |
autoMatchingCriteria.maxAutoMatchingPlayers |
integer |
The maximum number of players that should be added to the match by auto-matching. | |
autoMatchingCriteria.exclusiveBitmask |
long |
A bitmask indicating when auto-matches are valid. When ANDed with other exclusive bitmasks, the result must be zero. Can be used to support exclusive roles within a game. | |
requestId |
long |
A randomly generated numeric ID. This number is used at the server to ensure that the request is handled correctly across retries. |
Response
If successful, this method returns a TurnBasedMatches resource in the response body.
Try it!
Use the APIs Explorer below to call this method on live data and see the response.