cURL
curl --request POST \ --url https://api.example.com/api/auth/login \ --header 'Content-Type: application/json' \ --data ' { "Email": "<string>", "Password": "<string>" } '
{ "AccessToken": "<string>", "RefreshToken": "<string>", "AccessTokenExpiry": {}, "User": {} }
Authenticate and obtain access tokens
Id
Username
Email
CreatedAt
curl -X POST http://localhost:5000/api/auth/login \ -H "Content-Type: application/json" \ -d '{ "Email": "[email protected]", "Password": "SecureP@ss123" }'
{ "AccessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "RefreshToken": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6", "AccessTokenExpiry": "2026-03-10T15:45:00Z", "User": { "Id": "123e4567-e89b-12d3-a456-426614174000", "Username": "johndoe", "Email": "[email protected]", "CreatedAt": "2026-03-10T15:30:00Z" } }
{ "message": "Credenciales inválidas." }
{ "message": "Cuenta bloqueada temporalmente. Intenta en 12 minuto(s)." }