Skip to main content

Login

Authenticate and receive a JWT token for accessing the API.

Endpoint​

POST /login

Headers​

HeaderValue
Content-Typeapplication/json

Request Body​

FieldTypeRequiredDescription
usernamestring✅The username of your account
passwordstring✅The password for your account

Example Request​

curl -X POST -H "Content-Type: application/json" \
-d '{"username": "admin", "password": "password"}' \
http://localhost:9000/login

Response​

Success Response (200 OK)​

{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjY3NDQ4NDMsInVzZXJuYW1lIjoiYWRtaW4ifQ.eYkCNem24-6rpw8aXo6NIcN6xtU9rqq2_2YYz1nS82Q"
}

Response Fields​

FieldTypeDescription
tokenstringJWT token for authenticating subsequent API requests

Notes​

  • The JWT token should be included in the Authorization header as Bearer <token>
  • Tokens have an expiration time - you may need to re-authenticate periodically
  • Store the token securely and do not share it with unauthorized parties
  • Use this token for all authenticated API endpoints
  • If authentication fails, check your username and password credentials