- Development Integration
- /
- SDK
- /
- Java
- /
Management module
- /
Manage Webhook
- /
- Get Webhook Log
¶ Get Webhook log
Update time: 2025-07-23 07:34:21
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 webhook logs by specifying webhookId, optional page and limit. If webhookId does not exist, no error message is returned.
¶ Method Name
ManagementClient.getWebhookLogs
¶ Request Parameters
| Name | Type | Is it required | Default Value | Description | Example Value |
|---|---|---|---|---|---|
| webhookId | string | yes | - | Webhook ID | 6229ffaxxxxxxxxcade3e3d9 |
| page | number | no | 1 | Current page number, starting from 1 | 1 |
| limit | number | no | 10 | Number of pages per page, maximum cannot exceed 50, default is 10 | 10 |
¶ Sample Code
package test.management;
import cn.authing.sdk.java.client.ManagementClient;
import cn.authing.sdk.java.dto.CostGetCurrentUsageRespDto;
import cn.authing.sdk.java.dto.ListWebhookLogs;
import cn.authing.sdk.java.dto.ListWebhookLogsRespDto;
import cn.authing.sdk.java.model.ManagementClientOptions;
import cn.authing.sdk.java.util.JsonUtils;
public class GetWebhookLogsTest {
// Need to be replaced with your GenAuth Access Key ID
private static final String ACCESS_KEY_ID = "AUTHING_ACCESS_KEY_ID";
// Need to be replaced with your GenAuth Access Key Secret
private static final String ACCESS_KEY_SECRET = "AUTHING_ACCESS_KEY_SECRET";
public static void main(String[] args) throws Throwable {
ManagementClientOptions clientOptions = new ManagementClientOptions();
clientOptions.setAccessKeyId(ACCESS_KEY_ID);
clientOptions.setAccessKeySecret(ACCESS_KEY_SECRET);
// If you are a private deployment customer, you need to set the GenAuth service domain name
// clientOptions.setHost("https://api.your-authing-service.com");
ManagementClient client = new ManagementClient(clientOptions);
ListWebhookLogs listWebhookLogs = new ListWebhookLogs();
listWebhookLogs.setWebhookId("AUTHING_WEBHOOK_ID");
ListWebhookLogsRespDto webhookLogs = client.getWebhookLogs(listWebhookLogs);
System.out.println(JsonUtils.serialize(webhookLogs));
}
}
¶ Request Response
Type: ListWebhookLogsRespDto
| 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 (successful requests are not returned). For a detailed list of error codes, see: API Code List (opens new window) |
| requestId | string | Request ID. Returned when the request fails. |
| data | ListWebhookLogsData | Response data |
Example Results:
{
"statusCode": 200,
"message": "Operation successful",
"requestId": "934108e5-9fbf-4d24-8da1-c330328abd6c",
"data": {
"totalCount": 1,
"list": {
"webhookId": "6229ffaxxxxxxxxcade3e3d9",
"eventName": "user:created",
"requestBody": {
"eventName": "test",
"data": {
"description": "A test from authing"
}
},
"requestHeaders": {
"eventName": "test",
"data": {
"description": "A test from authing"
}
},
"responseStatusCode": 200,
"responseHeaders": {
"Accept": "application/json, text/plain, */*",
"user-agent": "authing-webhook@2.0",
"x-authing-token": "a",
"x-authing-webhook-secret": "a"
},
"responseBody": {
"success": true
},
"timestamp": "2022-09-20T08:55:00.188+0800",
"success": true,
"errorMessage": "ERRTIMEOUT"
}
}
}
¶ Data Structure
¶ ListWebhookLogsData
| Name | Type | Is it required | Description | Example Value |
|---|---|---|---|---|
| totalCount | number | yes | total number of records | 1 |
| list | array | yes | return list nestedType:WebhookLogDto。 |
¶ WebhookLogDto
| Name | Type | Is it required | Description | Example Value |
|---|---|---|---|---|
| webhookId | string | yes | Webhook ID | 6229ffaxxxxxxxxcade3e3d9 |
| eventName | string | yes | Webhook eventName | user:created |
| requestBody | object | yes | Webhook request body | {"eventName":"test","data":{"description":"A test from authing"}} |
| requestHeaders | object | yes | Webhook request headers | {"eventName":"test","data":{"description":"A test from authing"}} |
| responseStatusCode | number | yes | Webhook response code | 200 |
| responseHeaders | object | yes | Webhook response headers | {"Accept":"application/json, text/plain, */*","user-agent":"authing-webhook@2.0","x-authing-token":"a","x-authing-webhook-secret":"a"} |
| responseBody | object | yes | Webhook response body | {"success":true} |
| timestamp | string | yes | timestamp | 2022-09-20T08:55:00.188+0800 |
| success | boolean | yes | request success | true |
| errorMessage | string | no | error message returned when request fails | ERRTIMEOUT |
