Skip to main content

Log in

Authenticates a user and returns a short-lived access token plus a long-lived refresh token.

Request

Method: POST
Path: /api/users/login

Authentication: Not required

Request Body

Content Type: application/json

Schema: See component schemas below

Responses

200 - Authenticated

401 - Invalid credentials

429 - Rate limit exceeded (15 attempts per 15 minutes per IP)

Examples

cURL

curl -X POST \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
http://localhost:3000/api/users/login \
-d '{"example": "data"}'

JavaScript

const response = await fetch('http://localhost:3000/api/users/login', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + token,
},
body: JSON.stringify({
// Request data
}),
});

const data = await response.json();
console.log(data);

This documentation is automatically generated from the OpenAPI specification.