This endpoint verifies the user’s email and password, checks the user role (
user), and returns a JWT token upon successful authentication.
Request Body
string
required
The user’s email address
string
required
The user’s password
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
user), and returns a JWT token upon successful authentication.
curl -X POST "https://api.scorton.tech/auth/login" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "StrongPassword123!"
}'
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "TokenType"
}
| Status | Description |
|---|---|
| 200 OK | User authenticated successfully; returns access_token, role, and user_id |
| Status | Description | Example |
|---|---|---|
| 401 Unauthorized | Invalid credentials or role mismatch | json { "detail": "Unauthorized: Invalid credentials." } |
| 404 Not Found | User email not found | json { "detail": "Not Found: User not found." } |
| 500 Internal Server Error | Unexpected server error | json { "detail": "An unexpected error occurred" } |