Sign In
Authenticates a user and issues a JWT in the response header and a refresh token in the response body.
Headers
- Type: stringx
-api -key requiredAPI key for authentication
Body·
required
application/json
- Type: stringFormat: passwordpasswordrequired
a hint to UIs to mask the input
- Type: stringusernamerequired
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"
]
}