MonoRelay supports two local authentication methods: a simple static access key for single-user or server-to-server deployments, and full user accounts with username and password that each receive a short-lived JWT token.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Excurs1ons/MonoRelay/llms.txt
Use this file to discover all available pages before exploring further.
Access key authentication
The access key is the simplest way to authenticate. Set a key inconfig.yml under server.access_key, then pass it in every request as either a Bearer token or an X-Access-Key header. No registration or login step is required.
access_key_enabled: false in config.yml:
User account authentication
User accounts let multiple people access a MonoRelay instance with individual credentials. Each user logs in and receives a JWT token that they include in API requests.Register an account
Send aPOST request to /api/auth/register with a username, email address, and password. The password must be at least 8 characters.
The first user to register automatically becomes a super admin with full administrative privileges.
Log in
Send aPOST request to /api/auth/login with your username and password.
access_token in the response is a JWT that expires after 24 hours (expires_in is in seconds).
Use the token in API requests
Include the token in theAuthorization header as a Bearer token on every subsequent request.
Troubleshooting
401 Unauthorized
A401 Unauthorized response means the request either had no credentials or the credentials were rejected. Common causes:
| Cause | Fix |
|---|---|
Missing Authorization header | Add Authorization: Bearer <token> to your request |
| Expired JWT token | Log in again at /api/auth/login to get a new token |
| Wrong access key | Check server.access_key in your config.yml |
| Access key auth disabled | Set access_key_enabled: true or use a user account |
| Inactive account | Contact your MonoRelay administrator |