Sign In

Authenticates a user and issues a JWT in the response header and a refresh token in the response body.

Headers
  • x-api-key
    Type: string
    required

    API key for authentication

Body·
required
application/json
  • password
    Type: stringFormat: password
    required

    a hint to UIs to mask the input

  • username
    Type: string
    required
Responses
  • application/json
  • 401

    Invalid credentials.

Request Example for post/api/user/signin
curl https://demo.api.whispchat.com/api/user/signin \
  --request POST \
  --header 'x-api-key: ' \
  --header 'Content-Type: application/json' \
  --data '{
  "username": "johndoe",
  "password": "SecureP@ss123"
}'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "username": "string",
  "email": "hello@example.com",
  "refreshToken": "string",
  "roles": [
    "USER"
  ]
}