Authenticate an existing, verified account and receive a signed JSON Web Token (JWT). Include this token in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Danielsl4/TFG_DAM_2526_Consulta2/llms.txt
Use this file to discover all available pages before exploring further.
Authorization header of every request that requires authentication:
id, username, and role. Token lifetime is 7 days for regular users and 6 hours for accounts with the admin or referee role.
Rate limiting
This endpoint is protected byauthLimiter: 10 requests per 15 minutes per IP address. Exceeding this limit returns a 429 response.
Request body
The account username or email address. Lookup is case- and accent-insensitive, so
Futbolísta, futbolista, and [email protected] all resolve to the same account.The account password.
Response
200 — Authentication successful
Signed JWT token. Expires in 7 days for
user accounts, or 6 hours for admin and referee accounts.Error responses
| Status | Condition |
|---|---|
400 | username or password field is missing from the request body. |
401 | The credentials are incorrect (invalid username/email or wrong password). |
403 | The account is inactive or the email address has not been verified. |
429 | Rate limit exceeded (10 requests per 15 minutes per IP). |
500 | Internal server error during authentication or token generation. |
403 — Unverified account
When the account exists but the email has not been verified, the response body includes anot_verified flag:
Examples
Authenticate
cURL
Use the token in a subsequent request
cURL