Use the API endpoints (except those containing "/sa") with JWT authentication by providing a JWT token as the bearer token. This authentication method is recommended for client-side applications, PWAs, and mobile apps.
Authentication:
- Authentication token (JWT) is returned by the /api/login endpoint and can be found in the response Authorization header and response body too
- It is valid for 15 minutes
- All API requests must include this token in the Authorization header as Bearer {token}
- Initial refresh token is returned by the /api/login endpoint and can be found in the response "themanagement_refresh_token" cookie
Token Refresh:
- Refresh token is returned by both /api/login and /api/token/refresh endpoints
- It can be found in the response "themanagement_refresh_token" cookie
- It is valid for 30 days
- To obtain a new authentication token when it expires, send a POST request to /api/token/refresh with your refresh token cookie
- Refreshed authentication token is returned in the response Authorization header and response body too
Important: Each protected API request must contain the
Authorization header with the JWT token. When your token expires, use the refresh token to get a new one instead of requiring users to log in again.