FutsalManager uses JSON Web Tokens (JWT) for authentication. When you register or log in, the API returns a token you include in subsequent requests so the platform knows who you are. All new accounts receive the standardDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/danielsl4/TFG_DAM_2526/llms.txt
Use this file to discover all available pages before exploring further.
user role — elevated roles like admin and referee must be assigned by an administrator.
Register a new account
To create an account, send aPOST request to /auth/register with your chosen username, email address, and password. All three fields are required.
Registration automatically logs you in. You do not need a separate login call immediately after creating your account.
Log in to an existing account
If you already have an account, send aPOST request to /auth/login with your username and password. Email is not accepted at login — only username.
200 with a fresh token:
Using your token
Include the token in theAuthorization header of every request that requires authentication. Use the Bearer scheme:
localStorage and attaches it automatically. If you are building your own client, follow the same pattern.
Token expiry
Your token is valid for different durations depending on your role:| Role | Token lifetime |
|---|---|
user | 7 days |
admin | 6 hours |
referee | 6 hours |
401 response. Log in again to get a fresh token.
Rate limiting
To protect against brute-force attacks, the register and login endpoints accept a maximum of 10 requests per IP address per 15-minute window. This limit is tracked in Redis. If you exceed it, the API returns:Common errors
400 — Missing fields
400 — Missing fields
You omitted one or more required fields. Make sure
username, email, and password are all present in your register request, or username and password in your login request.401 — Invalid credentials
401 — Invalid credentials
The username was not found, or the password did not match. The API returns the same message in both cases to avoid revealing whether an account exists.
409 — Username already exists
409 — Username already exists
Someone already registered with that username. Choose a different one.
409 — Email already exists
409 — Email already exists
An account with that email address already exists. Use a different email or log in to your existing account.
Related pages
User profile
View your account details, porra score, and followed teams.
Match voting
Predict match results and earn points on the leaderboard.