GenAuth DocsDocuments
Concepts
User Guide
Development Integration
AgentAuth
Metadata
Development Integration
Multi-tenant (beta)
Console Documentation
Multi-tenant Console
Tenant Console
Saas Application Demo
Concepts
User Guide
Development Integration
AgentAuth
Metadata
Development Integration
Multi-tenant (beta)
Console Documentation
Multi-tenant Console
Tenant Console
Saas Application Demo
Old version
Development Integration
  • API

  • SDK

    • Java

    • Node.js

    • Python

      • Installation and Usage
      • Authentication Module

        • Login

        • Logout

        • Register

        • User Profile

        • Account Binding

        • MFA Factor Management

        • User Related Resources

          • Get Login History
          • Get Logged In Applications
          • Get Accessible Applications
          • Get Tenant List
          • Get Role List
          • Get Group List
          • Get Department List
          • Get Authorized Resource List
        • Message Service

        • WeChat Related APIs

        • Others

        • OIDC Module
        • OAuth Module
        • SAML Module
        • CAS Module
        • Events
      • Management Module

  • Error Codes
  1. Development Integration
  2. /
  3. SDK
  4. /
  5. Python
  6. /
  7. Authentication Module

  8. /
  9. User Related Resources

  10. /
  11. Get Login History

¶ Get login log

Update time: 2025-07-23 07:34:21
Edit

This document is automatically generated based on https://github.com/authing/authing-docs-factory based on https://api-explorer.genauth.ai V3 API, and is consistent with API parameters and return results. If the description of this document is incorrect, please refer to V3 API.

Get login log

¶ Method name

AuthenticationClient.get_login_history

¶ Request parameters

NameType
Required
Default value
Description
Sample value
appIdstringNo-Application ID, can be filtered by application ID. By default, it is not passed to get the login history of all applications.5f6265c67fxxxxae64ec516e
clientIpstringNo-Client IP, can be filtered by the client IP at the time of login. By default, it is not passed to get the login history of all login IPs.127.0.0.1
successbooleanno-Whether the login is successful or not. You can filter based on whether the login is successful or not. By default, the acquired records contain both successful and failed login histories.true
startnumberNo-Start time, as a timestamp in milliseconds1660828100000
endnumberNo-End time, as a timestamp in milliseconds1660828100000
pagenumberNo1Current page number, starting from 11
limitnumberNo10Number of pages per page, maximum cannot exceed 50, default is 1010

¶ Request response

Type: GetLoginHistoryRespDto

NameTypeDescription
statusCodenumberBusiness status code, which can be used to determine whether the operation is successful, 200 means success.
messagestringdescription
apiCodenumberSegmented error code, which can be used to get the specific error type (not returned for successful requests). For a detailed list of error codes, see: API Code List (opens new window)
requestIdstringRequest ID. Returned when the request fails.
dataLoginHistoryPaginatedRespDtoResponse data

Sample result:

{
  "statusCode": 200,
  "message": "Operation successful",
  "requestId": "934108e5-9fbf-4d24-8da1-c330328abd6c",
  "data": {
    "list": {
      "userId": "xxx",
      "appId": "xxx",
      "appName": "Sample application",
      "appLoginUrl": "https://example.genauth.ai/login",
      "appLogo": "https://files.authing.co/authing-console/default-app-logo.png",
      "loginAt": "2022-07-03T02:20:30.000Z",
      "clientIp": "127.0.0.1",
      "success": true,
      "errorMessage": "The account or password is incorrect",
      "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36",
      "parsedUserAgent": {
        "device": "Desktop",
        "browser": "Chrome",
        "os": "Windows"
      },
      "loginMethod": "loginByEmail",
      "geoip": {
        "location": { "lon": 116.3889, "lat": 39.9288 },
        "country_name": "China",
        "country_code2": "CN",
        "country_code3": "CN",
        "region_name": "Beijing",
        "region_code": "BJ",
        "city_name": "Beijing",
        "continent_code": "AS",
        "timezone": "Asia/Shanghai"
      },
      "tenantId": "642c1df417c2d8a80d744c1d"
    }
  }
}

¶ Data structure

¶ LoginHistoryPaginatedRespDto

NameType
Is it required?
Description
Sample value
totalCountnumberYesTotal number of records
listarrayYesList of records Nested type: LoginHistoryDto.

¶ LoginHistoryDto

NameType
Is it required?
Description
Sample value
userIdstringYesUser IDxxx
appIdstringYesApplication IDxxx
appNamestringYesApplication nameSample application
appLoginUrlstringYesApplication login addresshttps://example.genauth.ai/login
appLogostringYesApplication Logohttps://files.authing.co/authing-console/default-app-logo.png
loginAtstringYesLogin time2022-07-03T02:20:30.000Z
clientIpstringyesClient IP used for login127.0.0.1
successbooleanyesLogin success or failuretrue
errorMessagestringnoSpecific error message when login failsIncorrect account or password
userAgentstringyesUser AgentMozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
parsedUserAgentyesParsed User Agent Nested type: ParsedUserAgent.
loginMethodstringyesLogin method to useloginByEmail
geoipyesGeolocation Nested type: GeoIp.
tenantIdstringnoTenant ID642c1df417c2d8a80d744c1d

¶ ParsedUserAgent

NameType
Required
Description
Sample value
devicestringYesDevice type usedDesktop
browserstringYesBrowser nameChrome
osstringYesOperating systemWindows

¶ GeoIp

NameType
Required
Description
Sample value
locationYesGeographic location Nested type: GeoIpLocation.
country_namestringYesCountry NameChina
country_code2stringYesCountry Code 2CN
country_code3stringYesCountry Code 3CN
region_namestringYesRegion NameBeijing
region_codestringYesRegion CodeBJ
city_namestringYesCity NameBeijing
continent_codestringYesContinent CodeAS
timezonestringYesTime ZoneAsia/Shanghai

¶ GeoIpLocation

NameType
Required
Description
Sample value
lonnumberYesLongitude116.3889
latnumberYesLatitude39.9288
Previous article: Get Available MFA Factors Next article: Get Logged In Applications
  • Method name
  • Request parameters
  • Request response
  • Data structure

User identity management

Integrated third-party login
Customized authentication process

Enterprise internal management

Single sign-on
Multi-factor authentication
Permission management

Developer

Development Documentation
GitHub (opens new window)

Company

official@genauth.ai
16th Floor, Building B, Beichen Century Center, Chaoyang District, Beijing (Total)
Room 406, 4th Floor, Block B, No. 200, Tianfu Fifth Street, High-tech Zone, Chengdu (Branch)

© Beijing Steamory Technology Co., Ltd.