Authentication

Login

Authenticate a user and receive a JWT token. Does not require an existing API key.

SDK Usage:

const result = await client.login('user@example.com', 'password123');
client.updateApiKey(result.data.token);
post/api/user/login

Request body

emailstring email required
passwordstring password required

Example request

{
  "email": "user@example.com",
  "password": "password123"
}

Response

Login successful

codeinteger

Example response

{
  "code": 200,
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "email": "user@example.com",
    "firstName": "Jane",
    "lastName": "Smith",
    "token": "eyJhbGciOiJIUzI1NiIs..."
  }
}

Changes