Every request sent to the HungerBridge HTTP API must carry a shared secret token in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/iFamishedX/HungerBridge/llms.txt
Use this file to discover all available pages before exploring further.
X-Auth-Key header. The server checks this header against the value stored in config.yaml before processing any endpoint — if the header is absent or the value does not match, the request is rejected immediately with an HTTP 401 response. This applies universally across all endpoints, from legacy /run to the modern /v2/* routes.
How Authentication Works
HungerBridge implements authentication insideBridgeServer.auth(), which is the first check executed by every HTTP handler. The method reads the X-Auth-Key header from the incoming request and compares it to the key loaded from configuration at startup:
Finding Your Auth Key
On the very first startup, HungerBridge generates a random UUID and writes it toconfig.yaml under the auth.key field. The key location depends on which server platform you are running.
Fabric
config/HungerBridge/config.yaml relative to your server rootPaper / Purpur
plugins/HungerBridge/config.yaml relative to your server rootauth block:
config.yaml
key value is what you must supply as the X-Auth-Key header in every request.
Changing the Auth Key
Stop your Minecraft server
Shut down the server cleanly so HungerBridge releases its file handles before you edit the config.
Edit config.yaml
Open You can use any string value — a new UUID, a long passphrase, or any token your tooling generates.
config/HungerBridge/config.yaml (Fabric) or plugins/HungerBridge/config.yaml (Paper) and replace the value of auth.key with your new secret:config.yaml
Restart the server
HungerBridge reads the configuration once at startup. The new key takes effect immediately after the server comes back online.
Making Authenticated Requests
Pass the key in theX-Auth-Key header on every call. The examples below use the default port 30007.
Authentication Failure
When theX-Auth-Key header is missing or its value does not match the configured key, HungerBridge returns an HTTP 401 with the following JSON body:
The same 401 response is returned whether the header is absent or simply incorrect. HungerBridge does not distinguish between the two cases.
Security Recommendations
The auth key is a shared secret — anyone who holds it can execute arbitrary console commands on your server. Treat it accordingly.Keep the Key Private
Never commit
config.yaml to version control or paste the key into public chat. Rotate the key if you suspect it has been exposed.Restrict Network Access
HungerBridge binds to all interfaces by default. Use a firewall (e.g.
ufw, iptables, or your host’s security group) to block the HungerBridge port from public internet access.Bind to Localhost
If HungerLib and HungerBridge run on the same machine, block the port externally so traffic never leaves the host — the auth key then only needs to protect against local processes.
Use a Strong Key
The auto-generated UUID is sufficient entropy for most setups, but you can substitute any high-entropy string. Avoid short or guessable values.