Get access history

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

ParameterTypeRequiredDescription
skipinteger (int32)NoNumber of records to skip for pagination. Default: 0
countinteger (int32)NoNumber of records to return. Default: 20

Response

200 OK

Returns an array of login history records.

FieldTypeDescription
createdDatestring (date-time)Timestamp of the login attempt in ISO 8601 format
ipAddressstringIP address from which the login attempt was made
deviceIdstringUnique identifier of the device used for the login attempt
deviceNamestringHuman-readable name of the device used for the login attempt
locationstringGeographic location associated with the login attempt
userAgentstringUser agent string of the browser or client application used
successbooleanWhether the login attempt was successful (true) or failed (false)
userProfileIdinteger (int32)Internal identifier of the user profile that attempted to log in
mfabooleanWhether 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

CodeWhen it happens
401Token missing, expired, or invalid
403Insufficient permissions to access login history
404No login history records found for the authenticated user
500Internal server error

Common Mistakes

  • Omitting the Authorization header 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 (skip and count) when retrieving large login histories may return more records than needed; use skip and count to page through results efficiently.
  • The success field indicates whether the login attempt succeeded — a value of false does 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 partnerId
  • POST /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"
Query Params
int32
Defaults to 0
int32
Defaults to 20
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Response

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json