- Development Integration
- /
- SDK
- /
- Python
- /
Management Module
- /
获取审计日志
- /
- 获取用户行为日志
¶ Get user action log
Update time: 2025-07-23 07:34:21
You can select request ID, client IP, user ID, application ID, start timestamp, request success, and paging parameters to get user action log
¶ Method name
ManagementClient.get_user_action_logs
¶ Request parameters
Name | Type | Is it required | Default value | Description | Sample value |
---|---|---|---|---|---|
requestId | string | No | - | Request ID | xxx |
clientIp | string | no | - | Client IP | xxx |
eventType | string | no | - | Event type | login |
userId | string | no | - | User ID | xxx |
appId | string | no | - | Application ID | xxx |
start | number | no | - | Start timestamp | 11 |
end | number | no | - | End timestamp | 111 |
success | boolean | no | - | Whether the request is successful | true |
pagination | ListWebhooksDto | no | - | Pagination |
¶ Request Response
Type: UserActionLogRespDto
Name | Type | Description |
---|---|---|
statusCode | number | Business status code, which can be used to determine whether the operation is successful. 200 means success. |
message | string | Description |
apiCode | number | Segmented error code, which can be used to get the specific error type. |
requestId | string | Request ID. Returned when the request fails. |
data | UserActionLogRespData | Response data |
Example results:
{
"statusCode": 200,
"message": "Success",
"requestId": "934108e5-9fbf-4d24-8da1-c330328abd6c",
"data": {
"totalCount": 1,
"list": {
"userId": "xxx",
"userAvatar": "https://files.authing.co/authing-console/default-app-logo.png",
"userDisplayName": "xxx",
"userLoginsCount": 3,
"appId": "xxx",
"appName": "Demo",
"clientIp": "127.0.0.1",
"eventType": "login",
"eventDetail": "Login「 test@example.com 」",
"success": true,
"appLoginUrl": "https://example.genauth.ai/login",
"appLogo": "https://files.authing.co/authing-console/default-app-logo.png",
"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"
},
"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"
},
"timestamp": "2022-09-20T08:55:00.188+0800",
"requestId": "b63b9772-384c-4f2d-981b-01d1feed964d"
}
}
}
¶ Data Structure
¶ ListWebhooksDto
Name | Type | Is it required? | Description | Sample value |
---|---|---|---|---|
page | number | No | Current page number, starting from 1 | 1 |
limit | number | No | Number per page, maximum cannot exceed 50, default is 10 | 10 |
¶ UserActionLogRespData
Name | Type | Is it required? | Description | Sample value |
---|---|---|---|---|
totalCount | number | yes | total number of records | 1 |
list | array | yes | return list Nested type: UserActionLogDto. |
¶ UserActionLogDto
Name | Type | Is it required | Description | Sample value |
---|---|---|---|---|
userId | string | yes | User ID | xxx |
userAvatar | string | yes | User avatar | https://files.authing.co/authing-console/default-app-logo.png |
userDisplayName | string | yes | User display name, displayed in the following user field order: nickname > username > name > givenName > familyName -> email -> phone -> id | xxx |
userLoginsCount | number | yes | Number of user logins | 3 |
appId | string | yes | Application ID | xxx |
appName | string | yes | Application name | Sample application |
clientIp | string | No | Client IP, can be filtered based on the client IP at login. By default, it is not passed to obtain the login history of all login IPs. | 127.0.0.1 |
eventType | string | yes | Event type: - login : login- logout : logout- register : register- verifyMfa : verify MFA- updateUserProfile : modify user information- updateUserPassword : modify password- updateUserEmail : modify email- updateUserPhone : modify phone number- bindMfa : bind MFA- bindEmail : bind email- bindPhone : bind phone number- unbindPhone : unbind phone number- unbindEmail : unbind email- unbindMFA : unbind MFA- deleteAccount : Delete an account- verifyFirstLogin : First login verification | login |
eventDetail | string | No | Event details | Login account "test@example.com" |
success | boolean | Yes | Successful or not | true |
appLoginUrl | string | Yes | Application login address | https://example.genauth.ai/login |
appLogo | string | yes | Application Logo | https://files.authing.co/authing-console/default-app-logo.png |
userAgent | string | yes | User Agent | 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 | yes | Parsed User Agent Nested type: ParsedUserAgent. | ||
geoip | yes | Geographic location Nested type: GeoIp. | ||
timestamp | string | yes | time | 2022-09-20T08:55:00.188+0800 |
requestId | string | yes | request ID | b63b9772-384c-4f2d-981b-01d1feed964d |
¶ ParsedUserAgent
name | type | Is this field required | Description | Sample value |
---|---|---|---|---|
device | string | yes | Type of device to use | Desktop |
browser | string | yes | Browser name | Chrome |
os | string | yes | Operating system | Windows |
¶ GeoIp
Name | Type | Is this field required | Description | Sample value |
---|---|---|---|---|
location | Yes | Geolocation Nested type: GeoIpLocation. | ||
region_name | string | yes | Region Name | City |
continent_code | string | yes | Continent Code | AS |
timezone | string | yes | Timezone style="width:300px">Description | Example Value |
---- | ------ | -------------------------------------- | ----------------------------------- | ------------------------------------- |
lon | number | yes | longitude | 116.3889 |
lat | number | yes | latitude | 39.9288 |