UOJS has an API for things outside the game: a web site that shows who is online, a Discord bot, a launcher, a tool that manages spawners. It offers what the admin panel offers, plus a live stream of everything that happens on the shard.
Turning it on
Finding your way round
Scopes
A key can only do what its scopes allow, such as
Events and webhooks
The API speaks plain HTTP: put it behind something that adds TLS before you reach it from another machine.
Built something with it? Share it here, and put finished tools in Resources under Tools and Utilities.
Turning it on
- Set
"apiPort": 2595in the shard's config, or on the panel under Settings, and restart. - On the panel's API page, make a key. It is shown once.
- Send it with every request:
Authorization: Bearer <your key>.
Finding your way round
GET /v1 lists every endpoint, the scope it needs, what to send, and whether your key may use it. It is generated from the server's own table, so it is always current.Scopes
A key can only do what its scopes allow, such as
players:read or world:write. Give each key only what it needs.Events and webhooks
/v1/events streams what happens as it happens: logins, deaths, skill gains, purchases and much more. Webhooks send the same events to an address of yours.The API speaks plain HTTP: put it behind something that adds TLS before you reach it from another machine.
Built something with it? Share it here, and put finished tools in Resources under Tools and Utilities.