Custom Games
You can subscribe to changes in custom game state over WebSocket.
info
Please review our information on WebSocket OP-Codes!
WSS
Subscribe to state changes
wss://yunite.xyz/api/v3/guild/{guildId}/customs/stream- Init
- Messages
Path Parameters
| Name | Value type | Description |
|---|---|---|
| guildId | Guild ID Snowflake | The ID of the guild you want to access |
- Schema
- Example
{
"type": "array",
"itemSchema": {
"type": "object",
"properties": {
"limited": {
"type": "boolean",
"value": "always false if you can connect to this websocket"
},
"id": {
"type": "string",
"value": "id of this hosting session / game. Not an ingame session ID!"
},
"state": {
"type": "string",
"value": "one of ['SIGNUP_OPEN', 'DISPATCHING_PRIORITY', 'DISPATCHING_REGULAR', 'ALL_KEYS_DISPATCHED', 'MATCH_STARTED', 'FINISHED', 'CANCELLED']"
},
"host": {
"type": "object",
"properties": {
"name": {
"type": "string",
"value": "name of the host"
},
"id": {
"type": "string",
"value": "discord ID of the host"
},
"avatar": {
"type": "string",
"value": "url of the avatar of the host if present"
}
}
},
"players": {
"type": "array",
"itemSchema": {
"type": "object",
"properties": {
"secondChance": {
"type": "boolean",
"value": "true if this player is currently retrying to get the key if the first attempt failed"
},
"members": {
"type": "array",
"itemSchema": {
"type": "object",
"properties": {
"presenceReceivedOnce": {
"type": "boolean",
"value": "true if we received an ingame status of this player"
},
"alive": {
"type": "boolean",
"value": "true if this player is still ingame (not necessarily alive, sorry for the name)"
},
"playersAlive": {
"type": "int",
"value": "number of players alive in the game as reported through this player"
},
"session": {
"type": "string",
"value": "the session id this player is in, if we are tracking this player"
},
"epicId": {
"type": "string",
"value": "the epic id of this player"
},
"kills": {
"type": "int",
"value": "the number of kills of this player at the moment; might not be accurate; only available if we're tracking this player"
},
"epicName": {
"type": "string",
"value": "the epic name of this player"
},
"discordId": {
"type": "string",
"value": "the discord id of this player, if available"
},
"discordName": {
"type": "string",
"value": "the discord name of this player, if available"
}
}
}
},
"epicId": {
"type": "string",
"value": "the epic id of this player"
},
"epicName": {
"type": "string",
"value": "the epic name of this player"
},
"discordId": {
"type": "string",
"value": "the discord id of this player"
},
"avatarUrl": {
"type": "string",
"value": "the avatar URL of this player, if available"
},
"discordName": {
"type": "string",
"value": "the discord name of this player"
},
"priorityLevel": {
"type": "int",
"value": "the priority level of this player if they have one; lower means higher priority"
},
"rejectionReason": {
"type": "string",
"value": "the reason why this player has been rejected if the phase is REJECTED"
},
"lastUpdateTS": {
"type": "long",
"value": "unix timestamp in milliseconds of the last phase change"
},
"phase": {
"type": "string",
"value": "the current state of this player; one of ['SIGNED_UP', 'SELECTED', 'SLOT_RESERVED', 'FRIEND_ADDED', 'INVITED', 'DONE', 'REJECTED', 'TIMEOUT']"
}
}
}
},
"timestamp": {
"type": "string",
"value": "ISO-timestamp of this session"
},
"template": {
"type": "object",
"properties": {
"ID": {
"type": "string",
"value": "ID of this template"
},
"name": {
"type": "string",
"value": "name of this template"
},
"type": {
"type": "string",
"value": "game mode identifier"
},
"region": {
"type": "string",
"value": "one of ['NAE', 'NAW', 'EU', 'OCE', 'BR', 'ASIA', 'ME']"
},
"ruleText": {
"type": "string?",
"value": "rules of this template"
},
"memberCountAbsolute": {
"type": "boolean",
"value": "false if fill is allowed; false otherwise"
},
"liveTrackingEnabled": {
"type": "boolean",
"value": "true if live match tracking is enabled; false otherwise"
},
"leakDetectionEnabled": {
"type": "boolean",
"value": "true if leak detection is enabled; false otherwise"
},
"checkForBannedPlayers": {
"type": "boolean",
"value": "true if ingame bots are checking party members for banned players; false otherwise"
},
"requireAllPlayersLinked": {
"type": "boolean",
"value": "true if ingame bots are checking party members to be linked on the guild; false otherwise"
},
"priorityLevels": {
"type": "array",
"itemSchema": {
"type": "object",
"properties": {
"roles": {
"type": "array",
"itemSchema": {
"type": "string",
"value": "ids of roles of this level"
}
},
"timeout": {
"type": "int",
"value": "timeout in seconds"
}
}
}
},
"allowedPlatforms": {
"type": "array",
"itemSchema": {
"type": "string",
"value": "one of ['PC', 'PS4', 'XB1', 'SWITCH', 'MOBILE']. Note: PS4/XB1 may include next gen console players"
}
},
"roleToPing": {
"type": "string?",
"value": "role that will be pinged if sign up phase opened"
},
"resultChannelID": {
"type": "string?",
"value": "channel for matchmaking results"
},
"signUpChannelID": {
"type": "string",
"value": "channel for the sign up message"
},
"leakDetectionChannelID": {
"type": "string?",
"value": "channel for potential leak notifications"
},
"liveTrackingChannelID": {
"type": "string?",
"value": "channel in which Yunite posts the live tracking embed"
},
"maxPlayers": {
"type": "int",
"value": "amount of max players receiving the code (note: not parties or signed up users, we mean overall ingame players)"
}
}
},
"lastStateChange": {
"type": "long",
"value": "unix timestamp in milliseconds of the last 'state' change"
},
"customKey": {
"type": "string",
"value": "the custom key of this game"
},
"tournamentName": {
"type": "string",
"value": "the name of the tournament this game runs in, if present"
},
"unusedSlots": {
"type": "int",
"value": "slots left"
},
"currentQueueSizes": {
"type": "array",
"itemSchema": {
"type": "int",
"value": "current size of the priority queue at this index"
}
},
"originalQueueSizes": {
"type": "array",
"itemSchema": {
"type": "int",
"value": "original size of the priority queue at this index"
}
},
"currentDispatchedQueueIndex": {
"type": "int",
"value": "the index of the last dispatched queue at the moment"
}
}
}
}"Please play a match to get an example ..."