The current api version is v0 and paths are prefixed with /api/v0.
Returns information about the server like the name but no sensitive information.
"description": "A simple server",
"application": "linwood-swamp",
Connect to the websocket to receive real-time updates.
| | | |
|---|
| 0x00 | Sender (2 Bytes) | Receiver (2 Bytes) | Message (String) |
If we change a room or request a room info.
| | | | |
|---|
| 0x01 | Flags (1 Byte) | Max Players (2 Bytes) | Your ID (2 Bytes) | Room ID (Bytes) |
See Room Flags for more information.
If you join the server.
If you are kicked from a room.
| | |
|---|
| 0x03 | Reason (Byte) | Message (String) |
| Reason | Description |
|---|
| 0x00 | Room closed |
| 0x01 | Kicked from room |
| 0x02 | Banned from room |
| 0x03 | Host left |
| 0xFF | Unknown error |
If you want to join a room but it fails.
| Reason | Description |
|---|
| 0x00 | Room does not exist |
| 0x01 | Room is full |
| 0x02 | Banned from room |
| 0x03 | Application mismatch |
| 0xFF | Unknown error |
If you create a room but it fails.
| Reason | Description |
|---|
| 0x00 | Room limit reached |
| 0x01 | In room already |
| 0x02 | Flags unsupported |
| 0xFF | Unknown error |
| Type | Description |
|---|
| 0x00 | Joined websocket server |
| 0x01 | Kicked from room |
| 0x02 | Room does not exist |
| 0x03 | Room is full |
| 0x04 | Room creation |
Dark Room Event
Dark Room Event
Dark Room Event (toggleable), but returns empty error if not permitted
| | | … |
|---|
| 0x08 | Length (2 Bytes) | Player ID (2 Bytes) | … |
| | |
|---|
| 0x00 | Player ID (2 Bytes) | Message (String) |
Send a message to the receiver.
There are some special player ids:
0 - Send to all players
1 - Send to the host
| | |
|---|
| 0x03 | Flags (1 Byte) | Max Players (2 Bytes, optional) |
If Max Players is not set or set to 0, the server will use the default value.
Host only
| | |
|---|
| 0x04 | Player ID (2 Bytes) | Reason (String) |
Allows you to restrict the supported rooms.
You can use:
| | |
|---|
| 0x06 | Version (4 Bytes) | Application (String) |
to set the application or:
to remove the application restriction.
Currently not implemented
| Flag | Description |
|---|
| 0x01 | Dark Room (Restrict some events to only be seen by the host) |
| 0x02 | Toggle Player Visibility (On dark rooms, players can see each other, on normal rooms, they can’t) |
| 0x04 | Switch Host on Host Leave (If the host leaves, the host will be changed instead of closing the room) |