Skip to main content
POST
/
login
Login handler for basic authentication.
curl --request POST \
  --url https://api.example.com/login \
  --header 'Content-Type: application/json' \
  --data '
{
  "password": "<string>",
  "username": "<string>"
}
'
{
  "expires_at": 1,
  "token": "<string>"
}

Body

application/json

Login request payload.

password
string
required

Password for authentication

username
string
required

Username for authentication

Response

Login successful

Login response with JWT token.

expires_at
integer
required

Token expiration time (Unix timestamp)

Required range: x >= 0
token
string
required

JWT token for authenticated requests