POST /user/login
Description
The method is used to authorize a user by email and password. Upon successful authentication, a temporary JWT access token is returned. The token’s validity period can be set.
Request format
- HTTP method:
POST - URL:
/user/login - Content type:
application/json - Authorization: not required
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | ✅ | User’s email address | |
| password | string | ✅ | User’s password |
| valid_days | integer | ❌ | How many days the token will be valid. 0 — until manual logout |
Example Request (cURL)
curl -X POST "https://api.neuro-vision.ru/v1/user/login"
-H "Content-Type: application/json"
-d '{
"email": "test@enface.ai",
"password": "password",
"valid_days": 0
}' Example Answers
Success (200 OK)
{
"status": "ok",
"token": "jwt.temporary.token"
} Error (400 Bad Request)
{
"message": "invalid schema",
"status": "error"
} Error (403 Invalid user credentials)
{
"message": "invalid user credentials",
"status": "error"
}