Get Access History
The Get Access History endpoint retrieves the login history of the currently authenticated user. It returns details of recent login attempts including timestamps, IP addresses, device identifiers, and whether each attempt was successful. This endpoint is useful for security monitoring and tracking account access activity.
Endpoint
GET /api/users/logins
Authentication
Bearer token required. Obtain via:
POST https://api.banking.netevia.dev/api/auth/v2
Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.
When to use
Use this endpoint when a user wants to review their recent login activity for security purposes, such as verifying no unauthorized access has occurred. It is also useful for building account security dashboards that display login history to end users. Partners can integrate this endpoint into account management flows to help customers monitor and audit their own access history.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| skip | integer (int32) | No | Number of records to skip for pagination. Default: 0 |
| count | integer (int32) | No | Number of records to return. Default: 20 |
Response
200 OK
Returns an array of login history records.
| Field | Type | Description |
|---|---|---|
| createdDate | string (date-time) | Timestamp of the login attempt in ISO 8601 format |
| ipAddress | string | IP address from which the login attempt was made |
| deviceId | string | Unique identifier of the device used for the login attempt |
| deviceName | string | Human-readable name of the device used for the login attempt |
| location | string | Geographic location associated with the login attempt |
| userAgent | string | User agent string of the browser or client application used |
| success | boolean | Whether the login attempt was successful (true) or failed (false) |
| userProfileId | integer (int32) | Internal identifier of the user profile that attempted to log in |
| mfa | boolean | Whether multi-factor authentication was used during this login attempt |
[
{
"createdDate": "2026-06-08T14:30:00Z",
"ipAddress": "203.0.113.45",
"deviceId": "d1e2f3a4-b5c6-7890-abcd-ef1234567890",
"deviceName": "Chrome on Windows 11",
"location": "Miami, FL, US",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"success": true,
"userProfileId": 10045,
"mfa": true
},
{
"createdDate": "2026-06-07T09:15:22Z",
"ipAddress": "198.51.100.12",
"deviceId": "a9b8c7d6-e5f4-3210-fedc-ba9876543210",
"deviceName": "Safari on iPhone",
"location": "New York, NY, US",
"userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15",
"success": false,
"userProfileId": 10045,
"mfa": false
}
]Error Codes
| Code | When it happens |
|---|---|
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to access login history |
| 404 | No login history records found for the authenticated user |
| 500 | Internal server error |
Common Mistakes
- Omitting the
Authorizationheader or using an expired token will result in a 401 error; ensure the token is refreshed before it expires at the 10-minute mark. - Not using pagination parameters (
skipandcount) when retrieving large login histories may return more records than needed; useskipandcountto page through results efficiently. - The
successfield indicates whether the login attempt succeeded — a value offalsedoes not mean an error in the API call, it means the user's login attempt itself was denied (e.g., wrong password).
Related Endpoints
POST /api/auth/v2— Obtain a Bearer token by authenticating with username, password, and partnerIdPOST /api/auth/refresh— Refresh an existing Bearer token before it expires
Example
curl -X GET "https://api.banking.netevia.dev/api/users/logins?skip=0&count=20" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"