---
title: "Get Login History"
method: GET
path: "/v1/auth/login-history"
tags: ["Auth"]
---

# Get Login History

`GET /v1/auth/login-history`

Returns paginated login, login failure, and logout events from the AuditLogs collection for a specific user.

## Query parameters

- `userId` string, required
- `page` integer
- `pageSize` integer

## Response `200`

Default Response

- object
  - `meta` object, required
    - `page` integer, required
    - `pageSize` integer, required
    - `total` integer, required
    - `returned` integer, required
  - `entries` object[], required
    - `_id` string
    - `userId` string
    - `action` string
    - `createdAt` string, date-time
    - `ip` unknown
    - `device` object
      - `browser` string
      - `os` string
      - `deviceType` string
    - `location` object
      - `city` string
      - `region` string
      - `country` string
      - `timezone` string
    - `metadata` object
      - `loginType` string
      - `userAgent` string
      - `source` string
      - `success` boolean
      - `failureReason` string
      - `location` object
        - `city` string
        - `region` string
        - `country` string
        - `timezone` string

## Other responses

- `400` — Default Response
- `403` — Default Response
- `500` — Default Response

---

[API](https://skmtc.net/bluehive-health/apis/bluehive-api.md) · [All operations](https://skmtc.net/bluehive-health/apis/bluehive-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bluehive-health/bluehive-api/revisions/ae97a9add0ba/schema)
