---
title: "Get login activity for a HubSpot account."
method: GET
path: "/account-info/v3/activity/login"
tags: ["Activity"]
---

# Get login activity for a HubSpot account.

`GET /account-info/v3/activity/login`

## Request

- Base URL: `https://api.hubapi.com`
- URL: `https://api.hubapi.com/account-info/v3/activity/login`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://app.hubspot.com/oauth/authorize`
    - Token URL: `https://api.hubapi.com/oauth/v1/token` scopes: `account-info.security.read`
  - API key in header `private-app-legacy`
- TypeScript: <https://skmtc.dev/hubspot/apis/account-test-child-api/docs/account-info/v3/activity/login/get.ts> (a function with typed inputs; its response is checked against the schema)

Get login activity.

## Query parameters

- `after` string
- `limit` integer
- `userId` integer

## Response `200`

successful operation

- CollectionResponsePublicLoginAuditForwardPaging
  - `paging` ForwardPaging
    - `next` NextPage
      - `link` string
      - `after` string, required
  - `results` PublicLoginAudit[], required
    - `regionCode` string: The approximate region code of the login
    - `countryCode` string: The approximate country code of the login
    - `ipAddress` string: IP address where the activity originated.
    - `location` string
    - `userAgent` string: Information about the device used for logging in.
    - `id` string, required: The login activity's unique ID.
    - `loginAt` string, date-time, required: The time the login took place.
    - `userId` integer: The user's unique ID.
    - `email` string: Email address of the user associated with the login.
    - `loginSucceeded` boolean, required: Whether the login was successful or not.

## Other responses

- `default`: An error occurred.

---

[API](https://skmtc.dev/hubspot/apis/account-test-child-api.md) - [All operations](https://skmtc.dev/hubspot/apis/account-test-child-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hubspot/apis/account-test-child-api/revisions/8a3904f324f5?raw)
