curl -X GET 'https://verification.didit.me/v3/webhook/' \
-H 'x-api-key: YOUR_API_KEY'from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.webhooks.retrieve_config()
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.webhooks.retrieveConfig();
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.Webhooks.RetrieveConfig(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import me.didit.Didit;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.webhooks().retrieveConfig();
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->webhooks->retrieveConfig();
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.webhooks.retrieve_config
puts result.to_husing System;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.Webhooks.RetrieveConfigAsync();
Console.WriteLine(JsonSerializer.Serialize(result));{
"webhook_url": "https://yourapp.com/webhooks/didit",
"webhook_version": "v3",
"secret_shared_key": "dGhpcy1pcy10aGUtYXBwLWxldmVsLXNlY3JldC0wMDA",
"capture_method": "MOBILE",
"data_retention_months": 24,
"face_retention_policy": "delete_with_session",
"face_retention_days": null,
"biometric_consent_mode": "auto",
"available_events": [
{
"value": "status.updated",
"label": "Session status updated"
},
{
"value": "data.updated",
"label": "Session data updated"
},
{
"value": "user.status.updated",
"label": "User status updated"
},
{
"value": "user.data.updated",
"label": "User data updated"
},
{
"value": "business.status.updated",
"label": "Business status updated"
},
{
"value": "business.data.updated",
"label": "Business data updated"
},
{
"value": "activity.created",
"label": "Activity created"
},
{
"value": "transaction.created",
"label": "Transaction created"
},
{
"value": "transaction.status.updated",
"label": "Transaction status updated"
},
{
"value": "travel_rule.status.updated",
"label": "Travel Rule Status Updated"
},
{
"value": "workflow.compliance_changed",
"label": "Workflow Compliance Changed"
}
],
"allowed_return_hosts": [
"shop.example.com"
],
"endpoints": [
{
"uuid": "11111111-2222-3333-4444-555555555555",
"label": "Production session webhooks",
"url": "https://yourapp.com/webhooks/didit",
"enabled": true,
"webhook_version": "v3",
"secret_shared_key": "dGhpcy1pcy1hbi1leGFtcGxlLXNlY3JldC0wMDAwMDA",
"subscribed_events": [
"status.updated",
"data.updated"
],
"created_at": "2026-01-04T08:00:00.000000Z",
"updated_at": "2026-04-22T14:09:11.523671Z"
}
]
}获取 Webhook 配置 API:查询 Webhook 设置与事件
Didit 帮您读取应用的 Webhook 设置,包括旧版 Webhook URL 与密钥、目标地址、可订阅事件、数据保留策略和钱包回跳域名。
curl -X GET 'https://verification.didit.me/v3/webhook/' \
-H 'x-api-key: YOUR_API_KEY'from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.webhooks.retrieve_config()
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.webhooks.retrieveConfig();
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.Webhooks.RetrieveConfig(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import me.didit.Didit;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.webhooks().retrieveConfig();
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->webhooks->retrieveConfig();
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.webhooks.retrieve_config
puts result.to_husing System;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.Webhooks.RetrieveConfigAsync();
Console.WriteLine(JsonSerializer.Serialize(result));{
"webhook_url": "https://yourapp.com/webhooks/didit",
"webhook_version": "v3",
"secret_shared_key": "dGhpcy1pcy10aGUtYXBwLWxldmVsLXNlY3JldC0wMDA",
"capture_method": "MOBILE",
"data_retention_months": 24,
"face_retention_policy": "delete_with_session",
"face_retention_days": null,
"biometric_consent_mode": "auto",
"available_events": [
{
"value": "status.updated",
"label": "Session status updated"
},
{
"value": "data.updated",
"label": "Session data updated"
},
{
"value": "user.status.updated",
"label": "User status updated"
},
{
"value": "user.data.updated",
"label": "User data updated"
},
{
"value": "business.status.updated",
"label": "Business status updated"
},
{
"value": "business.data.updated",
"label": "Business data updated"
},
{
"value": "activity.created",
"label": "Activity created"
},
{
"value": "transaction.created",
"label": "Transaction created"
},
{
"value": "transaction.status.updated",
"label": "Transaction status updated"
},
{
"value": "travel_rule.status.updated",
"label": "Travel Rule Status Updated"
},
{
"value": "workflow.compliance_changed",
"label": "Workflow Compliance Changed"
}
],
"allowed_return_hosts": [
"shop.example.com"
],
"endpoints": [
{
"uuid": "11111111-2222-3333-4444-555555555555",
"label": "Production session webhooks",
"url": "https://yourapp.com/webhooks/didit",
"enabled": true,
"webhook_version": "v3",
"secret_shared_key": "dGhpcy1pcy1hbi1leGFtcGxlLXNlY3JldC0wMDAwMDA",
"subscribed_events": [
"status.updated",
"data.updated"
],
"created_at": "2026-01-04T08:00:00.000000Z",
"updated_at": "2026-04-22T14:09:11.523671Z"
}
]
}secret_shared_key 签名。顶层的 webhook_url、webhook_version 和 secret_shared_key 仅在没有启用任何目标时使用,且仅用于 status.updated 和 data.updated 事件。
授权
您的应用 API 密钥,可在 Business Console 的“开发者 -> API 密钥”中获取。主密钥拥有完整访问权限。指定名称的密钥可设置作用域:针对每个资源设为无权限、只读或读写,限定于特定工作流或已通过的会话、限定于 IP 地址列表,以及设置到期日期。401 表示密钥错误、已撤销或已过期;403 表示未发送密钥、密钥无权访问该资源或操作,或请求来自其 IP 列表之外的地址;在会话路由上返回 404 表示该会话不在该密钥允许的工作流或状态范围内。没有媒体访问权限的密钥获取到的图片、视频和 PDF URL 将为 null;没有会话写入权限的密钥获取到的会话链接和 token 将为 null。请参阅 https://docs.didit.me/console/api-keys。
响应
Webhook 配置。
应用级 Webhook 配置、保留策略和数字身份(Digital ID)钱包返回主机,以及所有 Webhook 目标。
应用级(旧版)Webhook URL。Didit 仅在应用没有已启用的目标时才向其发送事件,且仅发送 status.updated 和 data.updated。每次创建、更新或删除目标时,都会将其设置为最早启用的目标的 URL;若无已启用的目标,则设置为 null。
传统 webhook_url 的 payload 版本。每个目标都有其独立的 webhook_version。
v1, v2, v3 应用级签名密钥(43 字符的 URL 安全 token)。它仅对投递到旧版 webhook_url 的事件进行签名;每个目标则使用各自的 secret_shared_key 进行签名。通过 API 密钥调用的调用方始终会完整接收该密钥;没有 read:webhooks 权限的控制台用户将收到空字符串。
旧版应用设置。验证流程不会读取它:采集选项按工作流进行配置。
MOBILE, MOBILE_AND_DESKTOP 在 retain_until_user_deleted 策略下生物特征模板的保留期(以天为单位)。设置该策略时必填。
1 <= x <= 3650目标可以订阅的每种事件类型,附带显示标签。
Show child attributes
Show child attributes
该应用的每个 Webhook 目标,按时间正序排列,每个目标均附带其签名密钥。此处为只读:使用 /v3/webhook/destinations/ 系列 endpoint 管理目标。
Show child attributes
Show child attributes
托管验证流程可以嵌入并可通过会话回调将用户重定向回的源(Origin,例如 https://app.example.com;http 仅适用于 localhost)。服务器到服务器的调用不受影响。空列表表示无限制。Didit 会将每个源以小写形式存储,且不包含默认端口。无效条目将导致 allowed_domains 验证失败并返回 400。
50300["https://app.example.com"]