curl -X POST "https://api.hitler.app/api/auth/login" \
-H "Content-Type: application/json" \
-d '{
"email": "user@company.com",
"password": "securepassword123"
}'
const response = await api.login({
email: "user@company.com",
password: "securepassword123",
});
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresIn": 604800,
"user": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"email": "user@company.com",
"name": "John Doe",
"role": "employee",
"organizationId": "456e7890-e12b-34d5-a678-426614174000"
}
}
{
"statusCode": 401,
"message": "Invalid credentials",
"error": "Unauthorized"
}
Auth
Login
Authenticate a user with email and password
POST
/
api
/
auth
/
login
curl -X POST "https://api.hitler.app/api/auth/login" \
-H "Content-Type: application/json" \
-d '{
"email": "user@company.com",
"password": "securepassword123"
}'
const response = await api.login({
email: "user@company.com",
password: "securepassword123",
});
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresIn": 604800,
"user": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"email": "user@company.com",
"name": "John Doe",
"role": "employee",
"organizationId": "456e7890-e12b-34d5-a678-426614174000"
}
}
{
"statusCode": 401,
"message": "Invalid credentials",
"error": "Unauthorized"
}
Request
string
required
User’s email address
string
required
User’s password (minimum 8 characters)
Response
string
JWT token for authenticating subsequent requests
number
Token expiration time in seconds (default: 604800 = 7 days)
object
curl -X POST "https://api.hitler.app/api/auth/login" \
-H "Content-Type: application/json" \
-d '{
"email": "user@company.com",
"password": "securepassword123"
}'
const response = await api.login({
email: "user@company.com",
password: "securepassword123",
});
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresIn": 604800,
"user": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"email": "user@company.com",
"name": "John Doe",
"role": "employee",
"organizationId": "456e7890-e12b-34d5-a678-426614174000"
}
}
{
"statusCode": 401,
"message": "Invalid credentials",
"error": "Unauthorized"
}
⌘I