---
title: "Get a user's login history (internal)"
method: GET
path: "/v1/users/{user_id}/login_history"
tags: ["login-history"]
---

# Get a user's login history (internal)

`GET /v1/users/{user_id}/login_history`

## Request

- Base URL: `https://identity-api.paymongo.com`
- URL: `https://identity-api.paymongo.com/v1/users/{user_id}/login_history`
- Auth: none required

Internal lookup for support and fraud review. Same paging as GET /v1/login_history, plus the risk details: decision, reasons, mode, coordinates and the header family the location came from. Requires the internal API key.

## Path parameters

- `user_id` string, required

## Query parameters

- `limit` integer
- `after` string

## Headers

- `X-Internal-Api-Key` string, required

## Response `200`

OK

- object: Standard response containing data and its metadata if any
  - `data` object[]
    - `attributes` DeviceInternalLoginEventAttributesDTO
      - `auth_method` string
      - `created_at` string
      - `device` string
      - `device_id` string
      - `factor` string
      - `flagged` boolean
      - `geo_family` string
      - `ip_address` string
      - `latitude` number
      - `location` DeviceLoginLocationDTO
        - `city` string
        - `country_code` string
        - `country_name` string
        - `region` string
      - `longitude` number
      - `outcome` string
      - `risk_decision` string
      - `risk_mode` string
      - `risk_reasons` string[]
      - `session_id` string
      - `user_agent` string
    - `id` string
    - `type` string
  - `has_more` boolean

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/paymongo/apis/identity.md) - [All operations](https://skmtc.dev/paymongo/apis/identity/llms.txt) - [OpenAPI document](https://skmtc.dev/paymongo/apis/identity/revisions/cc3056164874?raw)
