POST /auth/login
Authenticate with your API credentials and receive an access_token and refresh_token.
This endpoint does not require authentication.
Request body
| Parameter | Type | Required | Description |
|---|
email | string | Yes | Your account email address |
password | string | Yes | Your account password |
Request
curl -X POST https://api.dokstamp.eu/auth/login \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"email": "admin@myschool.edu",
"password": "your_password"
}'
Response 200
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...",
"refresh_token": "def50200a9c4b...",
"token_type": "Bearer",
"expires_in": 31536000
}
| Field | Type | Description |
|---|
access_token | string | JWT token to include in Authorization: Bearer {token} |
refresh_token | string | Token used to obtain a new pair via POST /auth/refresh |
token_type | string | Always "Bearer" |
expires_in | integer | Validity in seconds (31 536 000 ≈ 1 year) |
Error 401
{ "message": "These credentials do not match our records." }
Error 422
{
"message": "The given data was invalid.",
"errors": {
"email": ["The email field is required."],
"password": ["The password field is required."]
}
}