Your Game must be connected to the VXG servers at all time via WebSocket. See Communication Protocol for more details.
You must answer VXG requests to start a match.
datavalue of the requests have the following values:
event: Internal name of the Gaming Pool, which has been specified in the dashboard.
accounts: Array containing accounts' data. If your game is using your own provider, it will contain the data you specified when connecting accounts. If your game is using
Steam, it will contain
steamID64s of the users. If your game is using
Lichess, it will contain Lichess tokens with
Send, accept and reject challengespermissions. Note that players have to be placed in the teams in the same order as their accounts are given by VXG. For example, if team sizes specified in the Developer Dashboard are
2, 2, 1, then the first two first accounts from this array must be placed in the first team, the third and fourth account must be placed in the second team, and the last account must be placed in the third team.
teams: Array containing specified team sizes.
matchId: Match ID.
If, for some reason, a match could not be created, the response must have a single value
successwhich must be
false. Otherwise, the response must have the following values:
success: Must be
url: A URL that can be used by players to join the match. It cannot exceed 256 characters.
description: An optional text that will be shown to the players. It cannot exceed 256 characters.
timeout: An optional timeout in miliseconds before users are allowed to join the match. It cannot exceed 15 seconds (
As soon as the match ends, you must send a
https://app.vxgaming.org/api/matchto notify VXG about the match result. In the query string you must provide the following parameters:
api-key: API key obtained from the Developer Dashboard,
match-id: Match ID, provided by VXG while creating the match.
The body must be JSON-encoded and it must include a single value
teams, which is an array of ones and zeros representing the match result. It must have the same length as the number of teams.
- If the match ended with a draw, all values must be ones.
- Otherwise, if
i-th team won the match, the
i-th element in the array must be
1, otherwise it must be
0. There can be more than one winner.
If the match result was acknowledged, VXG will send an empty response with status
200 OK. Otherwise, an error will be provided in the body.