Get Session History
GET
/web/v1/users/self/security/sessions/history JWTRetrieves paginated login history for the authenticated user. Supports time-range filtering. This endpoint replaces the old GET /profile/login-history.
Required Headers
| Header | Example Value | Description |
|---|---|---|
| Content-Type | application/json | Request content type |
| Accept | application/json | Expected response type |
| X-Client-Hash | Client device fingerprint | |
| Accept-Language | en, zh, zh-Hant, ja, vi | Response language (default: en) |
| Authorization | Bearer | JWT access token |
Request Parameters
| Name | Type | Required | In | Description |
|---|---|---|---|---|
page | Integer | Optional | query | Page number (default: 0) |
size | Integer | Optional | query | Page size (default: 20) |
startTime | String | Optional | query | Filter start time (ISO 8601) |
endTime | String | Optional | query | Filter end time (ISO 8601) |
Success Response
Success 200
{
"version": "1.3.0",
"timestamp": 1709337600000,
"success": true,
"code": "2000",
"message": "SUCCESS",
"data": {
"content": [
{
"loginTime": "2026-03-23T12:00:00Z",
"ipAddress": "1.2.3.4",
"userAgent": "Mozilla/5.0...",
"location": "San Francisco, US",
"success": true
}
],
"totalElements": 42,
"totalPages": 3,
"number": 0,
"size": 20
}
}Error Responses
Unauthorized 401
{
"success": false,
"code": "4010",
"message": "Invalid or expired token"
}Notes
- Replaces the old
GET /profile/login-historyendpoint — now grouped with session management. - Supports pagination and time-range filtering.
- Results are ordered by login time descending (most recent first).