Whitelist
Base: /api/whitelist
The whitelist decides who may join the server. In this section you read the allowed players, add players and remove them again, even before a player has joined for the first time. This fits an application form on your website, a Discord bot that unlocks members, or a panel. Since Hytale 0.6.8 the server manages the allowed players itself as a join permission. The mod uses this built-in mechanism and only falls back to its own whitelist.json without it.
Handler: WhitelistHandler
GET
/api/whitelist
Get whitelist
Returns a list of entries with uuid and name that are currently allowed to join.
Response Example
[
{
"uuid": "1234...",
"name": "Steve"
}
]
cURL
curl -X GET 'http://localhost:5550/api/whitelist' \
-H 'X-Admin-Token: YOUR_TOKEN'
The name is resolved from the players the mod knows. If it does not know the UUID yet, name contains the UUID itself. The response does not say whether the whitelist is switched on, it only contains the entries.
Internal Behavior
Reads the allowed players from the access module of Hytale (join permissions, stored in the permissions.json of the server). Only if this module is not available does the mod use its own whitelist.json.
POST
/api/whitelist
Add to whitelist
Adds a player. Unknown names are resolved through Hytale's whitelist command; success is only reported when Hytale confirms.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name
|
string | No | Player name (name or uuid required) |
uuid
|
string | No | Player UUID |
Response Example
{
"success": true,
"uuid": "1234...",
"name": "Steve"
}
cURL
curl -X POST 'http://localhost:5550/api/whitelist' \
-H 'X-Admin-Token: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"name": "NewPlayer"}'
At least name or uuid is needed, otherwise you get 400 with "UUID or name required". With a UUID the player is allowed directly. With a name, the mod looks up the UUID among the known players. If the name is unknown, it runs the server command whitelist add, which only works for names of 3 to 16 characters made of letters, digits and underscore. If that fails, it answers 200 with success: false. If the player is already registered, that counts as success.
Internal Behavior
Allows the join through the access module of Hytale or runs whitelist add <name>. Only without the access module does the mod write to its own whitelist.json.
DELETE
/api/whitelist/{name}
Remove from whitelist
Removes a player from the whitelist.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name
|
string | Yes | Player name or UUID (URL encoded) |
Response Example
{
"success": true,
"player": "Steve"
}
cURL
curl -X DELETE 'http://localhost:5550/api/whitelist/Eranio' \
-H 'X-Admin-Token: YOUR_TOKEN'
Name or UUID belong URL-encoded in the address. success: false means that the entry was not found or Hytale did not confirm the removal. If the name is missing, you get 400 with "Player name or UUID required".
Internal Behavior
Withdraws the join permission through the access module of Hytale or runs whitelist remove <name>. Only without the access module does the mod change its own whitelist.json.