> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# 身份验证快速入门：快速上线验证流程

> 使用 Didit 在数分钟内构建首个 KYC 流程：创建账户、配置无代码工作流、启动会话并接收 Webhook。每月享 $10 免费额度。

本快速入门将带您从零开始，使用全新的 Didit 账号完成一次真实的身份验证：创建您的账号、基于模板构建验证工作流、配置 Webhook 并复制 API 密钥、通过一次 API 调用发起验证会话，以及实时接收决策结果。本页面与下方的 Academy 教程配套：一段 19 分钟的实操录像，带您在真实控制台中构建验证工作流，涵盖从模板到发布流程、规则配置、分支设置、定价说明以及可分享链接的生成。[构建您的首个验证流程 — Didit Academy](https://www.youtube.com/embed/7-nJ3JE20i4?rel=0\&playsinline=1)

快速入门提示词
        将提示词复制到剪贴板



      
      

\<pre>

\````# Goal — ship your first Didit verification end-to-end

You are integrating Didit (https://docs.didit.me) into my project. Take me from zero to a working KYC / KYB flow: account, workflow, session, hosted UI, webhook, decision.

For the full canonical recipe (5K-token version covering SDK pick, webhook HMAC verification, every status, decision parsing), use:

https://docs.didit.me/integration/integration-prompt

That page has a "Copy Prompt" button — copy its prompt and follow it. The summary below is enough to bootstrap if you can't fetch the full prompt.

\## My application context

\<my_stack>
Stack: [framework + language, e.g. Next.js 15 + TypeScript]
Surface: [web | iOS | Android | React Native | Flutter | backend-only]
Use case: [KYC at signup | KYB at business onboarding | age gate | re-auth]
Database: [Postgres | MySQL | Mongo]
\</my_stack>

\## Steps

1\. **Register programmatically (2 calls)** — `POST https://apx.didit.me/auth/v2/programmatic/register/` then `POST https://apx.didit.me/auth/v2/programmatic/verify-email/` with the 6-char code. Save `response.application.api_key` as `DIDIT_API_KEY`.

2\. **Create a workflow** —
\```bash
curl -X POST https://verification.didit.me/v3/workflows/ \
-H "x-api-key: $DIDIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workflow_label": "Standard KYC",
"workflow_type": "kyc",
"features": [
  \{"feature": "OCR"},
  \{"feature": "LIVENESS", "config": {"face_liveness_method": "PASSIVE"}},
  \{"feature": "FACE_MATCH"},
  \{"feature": "AML"}
]
}'
\```
Persist `workflow.id`.

3\. **Create a session** —
\```bash
curl -X POST https://verification.didit.me/v3/session/ \
-H "x-api-key: $DIDIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"workflow_id": "$WORKFLOW_ID", "vendor_data": "user-42", "callback": "https://myapp.com/kyc/return"}'
\```
Response contains `session_id`, `url`, `session_token`. Redirect the user to `url` (or open in the SDK / an iframe).

4\. **Register a webhook destination** — `POST https://verification.didit.me/v3/webhook/destinations/` with `{"label": "Production", "url": "...", "subscribed_events": ["status.updated","data.updated","user.status.updated","user.data.updated"], "webhook_version": "v3"}` (`label` and `url` are required). Save the returned `secret_shared_key` as `DIDIT_WEBHOOK_SECRET` (`GET /v3/webhook/destinations/{destination_uuid}/` returns it again).

5\. **Receive webhooks** — verify the `X-Signature-V2` header (HMAC-SHA256 of canonical JSON; see /integration/webhooks). De-dupe on `event_id`. Respond within 5 seconds. Apply decision to your DB based on `status`.

6\. **Retrieve the decision (fallback)** — `GET https://verification.didit.me/v3/session/{session_id}/decision/`. V3 returns plural arrays (`id_verifications[]`, `liveness_checks[]`, `face_matches[]`, `aml_screenings[]`, ...). Never assume singular V2 fields.

\## Failure modes
\- Missing API key → `403 {"detail": "You do not have permission to perform this action."}` on verification.didit.me. Wrong, revoked or expired key → `401`. JWT problems on apx.didit.me → `403`.
\- Invalid `workflow_id` → `400`.
\- Webhook handler slower than 5s, or answering 5xx or 404 → Didit retries twice, after about 1 and 4 minutes, then drops the delivery. Resend it from the destination's delivery log.

\## Sources of truth (cross-check before shipping)
\- /openapi-25.json — verification API
\- /openapi-auth.json — programmatic auth
\- /reference/data-models — V3 decision shape
\- /integration/integration-prompt — canonical end-to-end prompt````

\</pre>



      
      

粘贴到

**1. 创建您的 Didit 账号**1) 前往 [business.didit.me](https://business.didit.me)
2) 使用 SSO 或邮箱与密码注册
3) 创建您的**组织** — 您的团队将在此管理工作流、API 密钥以及验证活动**2. 构建验证工作流**在侧边栏中导航至**工作流**，然后点击 **Create New**。选择工作流类型：| 类型 | 描述 |
| - | - |
| **Simple Workflow** | 步骤按既定顺序运行 — 适用于标准入驻流程 |
| **Node-Based Workflow** | 灵活的分支逻辑 — 根据验证结果构建条件路径 |选择一个模板以开始：| 模板 | 用例 |
| - | - |
| **KYC** | 标准用户入驻 |
| **自适应年龄验证** | 自拍照年龄核验，证件验证作为备用方案 |
| **生物识别认证** | 无密码自拍照二次认证 |
| **地址验证** | 地址证明流程 |通过开关功能块进行自定义：活体检测、人脸比对、AML、NFC、电话、邮箱等。下方片段截取自 Academy 教程的 2:50 处，展示了如何基于模板创建新工作流并逐节点进行配置。[基于模板创建新工作流 — Didit Academy](https://www.youtube.com/embed/7-nJ3JE20i4?start=170\&rel=0\&playsinline=1)**3. 配置 Webhook 并复制 API 密钥**在侧边栏中前往**开发者**，然后进入 **API 密钥**与 **Webhook**：1. 添加您的 **Webhook URL** — Didit 将向此处发送状态更新
2. 复制您的 **API 密钥** — 仅保存在服务器端，切勿暴露在前端代码中
3. 将目标的**签名密钥**以 `DIDIT_WEBHOOK_SECRET` 保存至您的 `.env` 中 — 验证接收到的 Webhook 上的 `X-Signature-V2` HMAC 时需要用到它> [!TIP]
>
> 您可以直接在此页面上使用不同的数据和状态测试 Webhook — 无需运行完整的验证流程。这让您可以在上线前验证集成是否正常运行。**4. 发起验证会话****方案 A — 托管会话**（推荐）我们首选的集成方式。Didit 会持续对托管流程进行 A/B 测试，因此完成率、速度和防欺诈能力会在无需您自行开发或发布任何 UI 的情况下不断提升。在控制台中，点击 **"+"** → 选择工作流 → 生成链接或二维码。或者通过编程方式创建会话：```bash theme={null}
curl -X POST https://verification.didit.me/v3/session/ \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"workflow_id": "your-workflow-id"}'
```> [!NOTE]
>
> 在侧边栏的**工作流**下可以找到您的 `workflow_id`。在集成相关的 Academy 教程中，这是 3:36 处的内容：仅包含一个必填字段的创建会话调用，随后是供应商数据和回调 URL。[创建会话：唯一的必填字段 — Didit Academy](https://www.youtube.com/embed/fX03-WEu_EI?start=216\&rel=0\&playsinline=1)**方案 B — 独立 API**（进阶）直接从您的后端调用 endpoint — 无需创建会话。最适合服务器间调用或自定义流程：| endpoint | 用途 |
| - | - |
| `POST /v3/id-verification/` | 证件核验 |
| `POST /v3/face-match/` | 自拍照与证件比对 |
| `POST /v3/aml/` | 制裁与 PEP |
| `POST /v3/passive-liveness/` | 深度伪造检测 |查看 [API Reference](https://docs.didit.me/zh/standalone-apis/id-verification.md) 中的完整列表。**5. 实时接收结果**Didit 会向您的 endpoint 发送 Webhook 事件 — 无需轮询。| 事件 | 触发器 |
| - | - |
| `status.updated` | 用户会话或企业会话状态变更 |
| `data.updated` | 会话或企业会话验证数据变更 |
| `user.status.updated` | 供应商用户状态变更 |
| `user.data.updated` | 供应商用户个人资料或聚合数据变更 |
| `business.status.updated` | 供应商企业状态变更 |
| `business.data.updated` | 供应商企业档案或聚合数据变更 |
| `activity.created` | 活动事件已记录 |
| `transaction.created` | 交易已创建 |
| `transaction.status.updated` | 交易状态变更 |有关 payload 格式和签名验证，请参阅 [Webhooks](https://docs.didit.me/zh/integration/webhooks.md)。**6. 管理与监控**使用控制台执行以下操作：- 实时查看会话进度
- 下载用于合规的 PDF/CSV 报告
- 将可疑证件或人脸加入黑名单
- 手动更新或拒绝会话这节关于解读结果的 Academy 教程将带您逐项核对一次真实会话：警告、评分、事件日志、Webhook 投递，以及您的合规团队所需的 PDF 导出。[如何解读验证结果 — Didit Academy](https://www.youtube.com/embed/7htTWCWsl60?rel=0\&playsinline=1)## 需要帮助？> [card] [邮箱](mailto:hello@didit.me)
>
> [hello@didit.me](mailto:hello@didit.me)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.