The Don Mamino API uses JSON Web Tokens (JWT) for authentication. You obtain a token by calling the login endpoint with valid credentials, then include that token in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/luisllatas-dev/Proyecto_Pasteleria_DonMamino/llms.txt
Use this file to discover all available pages before exploring further.
Authorization header of every subsequent request that requires authentication.
Log in and receive a token
Send aPOST request to /api/auth/login with your email address and password in the request body.
Request body
The email address associated with your user account.
The account password.
Example request
Example response
A successful login returns HTTP200 with a token and a usuario object.
Response fields
Confirmation message indicating a successful login.
The JWT to use in subsequent authenticated requests. Valid for 8 hours.
Use the token in requests
Include the token in theAuthorization header of every request to a protected endpoint, using the Bearer scheme.
Example authenticated request
curl
Error responses
| Scenario | Status | Response body |
|---|---|---|
| Wrong email or password | 401 Unauthorized | { "message": "Credenciales inválidas" } |
Authorization header missing | 403 Forbidden | { "message": "Se requiere un token de autenticación" } |
Malformed Authorization header | 403 Forbidden | { "message": "Formato de token inválido" } |
| Token expired or invalid | 401 Unauthorized | { "message": "Token inválido o expirado" } |
Ensure the
Authorization header value is formatted exactly as Bearer <token> — with a single space between Bearer and the token string.