Skip to main content
POST
/
auth
/
token
Login and get access token
curl --request POST \
  --url https://str.keroshospitality.com/api/v1/auth/token \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "clientId": "keros",
  "secret": "password"
}
'
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expires_in": 86400,
  "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"

Body

application/json

LoginRequest defines the authentication request payload

clientId
string
required

ClientID is the unique identifier for the client

Example:

"keros"

secret
string
required

Secret is the client's password or secret key

Example:

"password"

Response

Login successful

TokenResponse defines the authentication response payload

access_token
string

JWT token for authentication

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

expires_in
integer

Number of seconds until the access token expires

Example:

86400

refresh_token
string

Token used to obtain new access tokens

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."