curl -X POST "https://api.hitler.app/api/auth/refresh" \
-H "Authorization: Bearer YOUR_CURRENT_TOKEN"
const response = await api.refreshToken();
{
"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": "Unauthorized",
"error": "Unauthorized"
}
Auth
Refresh Token
Generate a new JWT token
POST
/
api
/
auth
/
refresh
curl -X POST "https://api.hitler.app/api/auth/refresh" \
-H "Authorization: Bearer YOUR_CURRENT_TOKEN"
const response = await api.refreshToken();
{
"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": "Unauthorized",
"error": "Unauthorized"
}
This endpoint requires authentication. The current token must still be valid.
Response
string
New JWT token
number
Token expiration time in seconds
object
User information
curl -X POST "https://api.hitler.app/api/auth/refresh" \
-H "Authorization: Bearer YOUR_CURRENT_TOKEN"
const response = await api.refreshToken();
{
"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": "Unauthorized",
"error": "Unauthorized"
}
⌘I