Most HungerBridge endpoints — across all three API generations — are protected by a shared-secret key. The server checks each incoming request for a matchingDocumentation 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 before processing it. No key, or a wrong key, results in an immediate 401 Unauthorized response. Two endpoints, GET /v1/status and GET /v1/version, do not call the auth check and will respond to any caller that can reach the port (when those endpoints are enabled).
The X-Auth-Key Header
The shared secret that authorizes the request. Must exactly match the
auth.key value in config.yaml. The comparison is case-sensitive and byte-exact — no trimming or normalization is applied.Obtaining the Key
The authentication key lives inconfig.yaml under the auth section:
config.yaml does not exist when HungerBridge starts, the plugin auto-generates a fresh file with a randomly generated UUID as the key. The generated file is written to the plugin’s configuration directory (e.g. plugins/HungerBridge/config.yaml on Paper/Purpur, or the equivalent Fabric config path).
Making an Authenticated Request
Pass the key in theX-Auth-Key header on every request. The example below calls the v2 ping endpoint:
- curl
- Python
- JavaScript (fetch)
401 Unauthorized — Invalid or Missing Key
When theX-Auth-Key header is absent or does not match the configured key, HungerBridge returns:
Endpoints That Skip Auth
Two v1 endpoints do not invoke the auth check at all and therefore respond without requiring a key:| Endpoint | Notes |
|---|---|
GET /v1/status | Returns bridge version, platform, and Minecraft version as flat fields alongside ok. |
GET /v1/version | Returns version metadata; response does not include an ok field. |
config.yaml (they are disabled by default). A disabled endpoint returns 403 Forbidden before any auth check would occur.
Security Best Practices
Keep the following recommendations in mind when deploying HungerBridge:- Bind to localhost when possible. If HungerLib runs on the same host as the Minecraft server, set the server to listen on
127.0.0.1(or leave the OS default) so the port is not reachable from other machines. - Restrict the port with a firewall. Use
iptables,ufw, or your cloud provider’s security group rules to allow connections only from trusted IP addresses. - Use a VPN or SSH tunnel for remote access. If HungerLib must connect over a network, route the connection through WireGuard, OpenVPN, or an SSH port forward to ensure the key is never transmitted in clear text across untrusted networks.
- Treat the key like a password. Use a sufficiently long, random value. The default auto-generated UUID (128 bits of entropy) is a good baseline.
- Rotate the key if it is ever compromised. Update
auth.keyinconfig.yamland restart the server, then update HungerLib’s configuration to match.