Overview
The UTMStack Authentication API issues JWT tokens to clients who provide valid credentials. Clients must authenticate using this endpoint before calling any protected resource in the UTMStack platform.This endpoint does not require authentication. It returns a JWT access token that must be used for subsequent requests.
Endpoint Details
POST /api/authenticate
Method: POST
Content-Type: application/json
Authentication: Not required
Response: JWT token for API access
Content-Type: application/json
Authentication: Not required
Response: JWT token for API access
Parameters
Request Body
User login name or email address
User password
Optional. Keeps the session active for a longer period
JSON Schema (Request)
Response Examples
Successful Authentication (TFA disabled)
- Response
- Headers
TFA Challenge (TFA enabled)
When
authenticated
is false
, you need to complete the two-factor authentication process by providing the verification code sent to your email.JSON Schema (Response)
Request & Response Examples
Additional Code Examples
Status Codes
Authentication successful. Token returned.
Invalid username or password.
Login blocked (too many attempts).
Rate limit exceeded.
Unexpected issue during authentication.
Error Handling
401 Unauthorized
401 Unauthorized
403 Forbidden
403 Forbidden
Description: Login temporarily blocked due to multiple failed attempts
Resolution: Wait for cooldown period or contact admin.
Resolution: Wait for cooldown period or contact admin.
500 Internal Server Error
500 Internal Server Error
Description: Unexpected backend error
Resolution: Check logs or contact UTMStack support.
Resolution: Check logs or contact UTMStack support.
Security Considerations
Important Security Notes:
- Always use HTTPS (TLS) when sending credentials
- Do not store plain-text passwords or tokens locally
- Implement token expiration and refresh mechanisms in clients
- If TFA is enabled, a second verification code is sent by email
Using the Token
After successful authentication, include the JWT token in the Authorization header for subsequent API requests:Test your authentication by making a request to
/api/elasticsearch/search
with your Bearer token to verify it’s working correctly.