> ## 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.

# 用户列表 API：供应商用户实体

> 通过 Didit 检索应用的全部供应商用户实体，可按状态、搜索词和日期筛选，实现程序化的用户生命周期管理。



列出用户的提示词
        将提示词复制到剪贴板



      
      

\<pre>

\`Goal: Page through Didit User entities for an application and consume them in your backend.

Endpoint: GET https://verification.didit.me/v3/users/
Auth header: x-api-key: <DIDIT_API_KEY>

Query params (all optional):
\- status: "ACTIVE" | "FLAGGED" | "BLOCKED" (VendorUserStatusChoices, NOT the session enum).
\- search: free-text over vendor_data, display_name, full_name, approved_emails, approved_phones.
\- country: ISO 3166-1 alpha-3 (e.g. "USA", "ESP") — filters by issuing country of approved documents.
\- limit: integer, 1–200, default 50.
\- offset: integer, 0+, default 0. Prefer following the "next" URL from the previous page.

curl:
curl -X GET 'https://verification.didit.me/v3/users/?limit=50&status=ACTIVE' \
-H 'x-api-key: YOUR_API_KEY'

Response 200 (envelope):
\{
"count": <int — exact up to 100, capped above; pagination still works via "next">,
"next": <URL of next page or null>,
"previous": <URL of previous page or null>,
"results": [ UserListItem, ... ]
}

UserListItem key fields: didit_internal_id (UUID), vendor_data (string, may be null), display_name, full_name, effective_name, status, portrait_image_url, session_count, approved_count, declined_count, in_review_count, issuing_states, approved_emails, approved_phones, features (map of feature -> "Approved" | "Declined" | "In Review" | ...), features_list, last_session_at, first_session_at, tags, created_at. See /reference/data-models for the full shape.

Notes:
\- Ordered by last_session_at desc (most recently active first).
\- Deleted users are not returned.
\- vendor_data is a free-form client-supplied string, NOT a UUID. It may be null when the originating session did not provide one.

Pagination loop:
url = 'https://verification.didit.me/v3/users/?limit=200&status=ACTIVE'
while url:
r = requests.get(url, headers={'x-api-key': API_KEY})
r.raise_for_status()
page = r.json()
for user in page['results']:
    ...handle user...
url = page['next']

Failure modes (all return {"detail": "..."} unless noted):
\- 401 — missing or revoked x-api-key.
\- 403 — the API key is revoked or is not valid for this application.
\- 429 — rate-limited. Honour Retry-After header.

For end-to-end Didit integration, paste in the full prompt at /integration/integration-prompt.`

\</pre>



      
      

粘贴到

## 概览返回当前已认证应用的[用户实体](https://docs.didit.me/zh/entities/users/overview.md)分页列表。可用于将用户同步到您的数据仓库、找出需要分析人员关注的用户，或按显示名称搜索。## 适用场景- **定期同步**：将您的用户表同步到外部 BI 或数据仓库。
- **分析人员队列**：按 `status=FLAGGED` 或长时间未活动的 `last_activity_at` 筛选，以生成审核收件箱。
- **搜索**用户，可按 `display_name`、`full_name` 或 `vendor_data`。## 筛选与分页| 查询参数 | 说明 |
| - | - |
| `status` | 按 `ACTIVE`、`FLAGGED` 或 `BLOCKED` 筛选。 |
| `search` | 对 `vendor_data`、`display_name`、`full_name`、邮箱和电话进行子字符串匹配。 |
| `country_code` | 按 `issuing_states`（ISO 3166-1 alpha-3）筛选。 |
| `created_after`, `created_before` | 创建日期范围（ISO 8601）。 |
| `last_activity_after`, `last_activity_before` | 活动时间范围。 |
| `page_size` | 1–200。默认值：50。 |
| `cursor` | 上一次响应返回的分页游标。 |## 注意事项- 每个响应条目都包含 `didit_internal_id`。当原始会话或交易未提供 `vendor_data` 时，它可能为 `null`。
- 此 endpoint 通过游标分页：在两次调用之间保存 `next` 游标，当 `next` 为空时停止。
- 有关用户记录的所有字段，请参阅[用户数据模型](https://docs.didit.me/zh/entities/users/data-model.md)。## 权限应用的任意有效 API 密钥均可调用此 endpoint。Didit 的 API 密钥是**按应用划分的，而非按角色划分的**：控制台的[角色与权限](https://docs.didit.me/zh/console/roles-permissions.md)（`list:users` 及其他权限）决定的是*人员*可以在控制台中做什么，对 Management API 流量则不做评估。请通过控制谁能读取应用的 API 密钥，来控制谁可以调用此 endpoint。## 相关内容- [用户概览](https://docs.didit.me/zh/entities/users/overview.md)
- [获取用户](https://docs.didit.me/zh/management-api/users/get.md)
- [用户操作](https://docs.didit.me/zh/entities/users/operations.md)


## OpenAPI

````yaml zh/openapi-25.json GET /v3/users/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: 身份证件验证 API。使用 x-api-key 请求头进行身份验证。
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/users/:
    get:
      tags:
        - Users
      summary: 列出用户
      description: >-
        列出 Didit 根据共享相同 `vendor_data`（自由格式字符串，非 UUID）的 KYC
        会话汇编的[用户](/entities/users)，以及通过 API 创建的用户。支持分页，按 `last_session_at`
        降序排列。该 endpoint 不支持过滤或搜索参数，请获取分页并在客户端进行过滤。
      operationId: list_users
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
            default: 50
            minimum: 1
            maximum: 1000000
          description: 页面大小。省略时默认为 50。虽无强制上限，但为降低延迟建议保持较小的页面大小。
        - name: offset
          in: query
          schema:
            type: integer
            maximum: 1000000
            minimum: 0
            default: 0
          description: 要返回的第一条记录的从零开始的偏移量。建议跟随上一页的 `next` URL，而不是手动计算。
      responses:
        '200':
          description: 分页的用户列表，包含验证状态、会话计数和功能明细。
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                    description: >-
                      匹配行数，出于性能考虑，不超过 100 时为精确值，超过 100 时上限为 100。请勿使用它来检测最后一页；应依靠
                      `next` 为 `null` 进行判断。
                  next:
                    type: string
                    nullable: true
                    description: 下一页的绝对 URL，最后一页则为 `null`。
                  previous:
                    type: string
                    nullable: true
                    description: 上一页的绝对 URL，第一页则为 `null`。
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/UserListItem'
              examples:
                Example:
                  value:
                    count: 2
                    next: null
                    previous: null
                    results:
                      - didit_internal_id: f4e5e1f2-94a9-4f86-8c16-2b7d9b4db418
                        vendor_data: user-abc-123
                        display_name: null
                        full_name: John Michael Doe
                        date_of_birth: '1990-05-15'
                        effective_name: John Michael Doe
                        status: ACTIVE
                        portrait_image_url: https://<media-host>/...
                        session_count: 3
                        approved_count: 2
                        declined_count: 0
                        in_review_count: 1
                        issuing_states:
                          - USA
                        approved_emails:
                          - john@example.com
                        approved_phones:
                          - '+14155551234'
                        features:
                          ID_VERIFICATION: Approved
                          LIVENESS: Approved
                          FACE_MATCH: Approved
                          AML: Approved
                        features_list:
                          - feature: ID_VERIFICATION
                            status: Approved
                          - feature: LIVENESS
                            status: Approved
                          - feature: FACE_MATCH
                            status: Approved
                          - feature: AML
                            status: Approved
                        last_session_at: '2025-06-15T10:30:00Z'
                        last_activity_at: '2025-06-15T10:30:00Z'
                        first_session_at: '2025-06-01T08:00:00Z'
                        tags:
                          - uuid: 9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d
                            name: VIP
                            color: '#2567FF'
                        created_at: '2025-06-01T08:00:00Z'
                      - didit_internal_id: 6ed99d53-e8f5-4cf8-9ac1-4a506cb40f6b
                        vendor_data: null
                        display_name: Jane S.
                        full_name: Jane Elizabeth Smith
                        date_of_birth: '1985-11-22'
                        effective_name: Jane S.
                        status: FLAGGED
                        portrait_image_url: null
                        session_count: 1
                        approved_count: 0
                        declined_count: 0
                        in_review_count: 1
                        issuing_states: []
                        approved_emails: []
                        approved_phones: []
                        features:
                          ID_VERIFICATION: In Review
                        features_list:
                          - feature: ID_VERIFICATION
                            status: In Review
                        last_session_at: '2025-06-20T14:00:00Z'
                        last_activity_at: '2025-06-20T14:05:00Z'
                        first_session_at: '2025-06-20T14:00:00Z'
                        tags: []
                        created_at: '2025-06-20T14:00:00Z'
        '401':
          description: >-
            未提供凭证。对 `/v3/users/*` 路径的请求如果不包含 `x-api-key` 请求头（或 `Authorization:
            Bearer` token），将在到达 API 之前被身份验证中间件拒绝。
          content:
            application/json:
              examples:
                Missing credentials:
                  value:
                    detail: >-
                      You must be authenticated with a valid access token to
                      access this endpoint.
        '403':
          description: 该密钥无法列出此应用的用户。缺少密钥返回 `403`；错误、已撤销或已过期的密钥返回 `401`。
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    detail: You do not have permission to perform this action.
        '429':
          description: 超出速率限制；请退避并在 `Retry-After` 指定的间隔后重试。
          content:
            application/json:
              examples:
                Rate limited:
                  value:
                    detail: Request was throttled. Expected available in 30 seconds.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: |-
            curl -X GET 'https://verification.didit.me/v3/users/?limit=50' \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            for item in client.users.list():
                print(item)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit from "@didit-protocol/sdk-node";

            // Reads DIDIT_API_KEY.
            const didit = new Didit();

            for await (const item of didit.users.list()) {
              console.log(item);
            }
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Users.ListAutoPaging(ctx, didit.UsersListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
        - lang: java
          label: Java
          source: |-
            import me.didit.Didit;

            // Reads DIDIT_API_KEY.
            Didit client = new Didit();

            for (var item : client.users().list()) {
                System.out.println(item);
            }
        - lang: php
          label: PHP
          source: |-
            <?php

            require 'vendor/autoload.php';

            use Didit\DiditClient;

            // Reads DIDIT_API_KEY.
            $didit = new DiditClient();

            foreach ($didit->users->list() as $item) {
                print_r($item->toArray());
            }
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY.
            didit = Didit::Client.new

            didit.users.list.auto_paging_each do |item|
              puts item.to_h
            end
        - lang: csharp
          label: .NET
          source: |-
            using System;
            using System.Text.Json;
            using Didit;

            // Reads DIDIT_API_KEY.
            using var client = new DiditClient();

            await foreach (var item in await client.Users.ListAsync())
            {
                Console.WriteLine(JsonSerializer.Serialize(item));
            }
components:
  schemas:
    UserListItem:
      type: object
      description: 已验证的用户。
      properties:
        didit_internal_id:
          type: string
          format: uuid
          description: Didit 为此用户分配的稳定内部 UUID。
        vendor_data:
          type: string
          nullable: true
          description: 您对此用户的唯一标识符（创建会话时传入）。未提供供应商标识符时可为 null。
        display_name:
          type: string
          nullable: true
          description: 您设置的自定义显示名称
        full_name:
          type: string
          nullable: true
          description: 从已验证证件中提取的姓名
        date_of_birth:
          type: string
          format: date
          nullable: true
        effective_name:
          type: string
          nullable: true
          description: 最佳可用名称：如果已设置则为 display_name，否则为 full_name
        status:
          type: string
          enum:
            - ACTIVE
            - FLAGGED
            - BLOCKED
          description: >-
            用户记录的生命周期状态（并非会话状态）。`ACTIVE` 为默认值，`FLAGGED` 标记该用户需要人工关注，`BLOCKED`
            会阻止该 `vendor_data` 创建新会话。
        portrait_image_url:
          type: string
          nullable: true
          description: 用户肖像照片的预签名 URL（数小时后过期）
        session_count:
          type: integer
          description: 该用户的验证会话总数
        approved_count:
          type: integer
          description: 已通过的会话数量
        declined_count:
          type: integer
          description: 已拒绝的会话数量
        in_review_count:
          type: integer
          description: 审核中的会话数量
        issuing_states:
          type: array
          items:
            type: string
          description: >-
            此用户已通过的身份证件上显示的签发国家/地区的 ISO 3166-1 alpha-3 代码，例如 `["USA",
            "ESP"]`。无时为空数组。
        approved_emails:
          type: array
          items:
            type: string
          description: 从该用户已通过的会话中收集的已验证邮箱地址，例如 `["john@example.com"]`。
        approved_phones:
          type: array
          items:
            type: string
          description: 从该用户已通过的会话中收集的已验证电话号码，例如 `["+14155551234"]`。
        features:
          type: object
          description: >-
            该用户所有会话的每项功能汇总状态。可选键：`ID_VERIFICATION`、`NFC`、`LIVENESS`、`FACE_MATCH`、`POA`、`QUESTIONNAIRE`、`EMAIL_VERIFICATION`、`PHONE`、`AML`、`IP_ANALYSIS`、`AGE_ESTIMATION`、`DATABASE_VALIDATION`。可选值：`Approved`、`Declined`、`In
            Review`、`Not Finished`、`Resub Requested`。
        features_list:
          type: array
          items:
            type: object
            properties:
              feature:
                type: string
              status:
                type: string
          description: 与 `features` 相同的数据，为 `{feature, status}` 对象的有序数组。
        last_session_at:
          type: string
          format: date-time
          nullable: true
          description: 最近一次会话的时间戳
        first_session_at:
          type: string
          format: date-time
          nullable: true
          description: 首次会话的时间戳
        last_activity_at:
          type: string
          format: date-time
          nullable: true
          description: 该用户最近一次活动的时间戳（会话、交易、状态变更、数据编辑等）。
        tags:
          type: array
          items:
            type: object
            properties:
              uuid:
                type: string
                format: uuid
              name:
                type: string
              color:
                type: string
          description: 分配给该用户的标签
        created_at:
          type: string
          format: date-time
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        您的应用 API 密钥，可在 Business Console 的“开发者 -> API
        密钥”中获取。主密钥拥有完整访问权限。指定名称的密钥可设置作用域：针对每个资源设为无权限、只读或读写，限定于特定工作流或已通过的会话、限定于
        IP 地址列表，以及设置到期日期。401 表示密钥错误、已撤销或已过期；403 表示未发送密钥、密钥无权访问该资源或操作，或请求来自其 IP
        列表之外的地址；在会话路由上返回 404 表示该会话不在该密钥允许的工作流或状态范围内。没有媒体访问权限的密钥获取到的图片、视频和 PDF
        URL 将为 null；没有会话写入权限的密钥获取到的会话链接和 token 将为 null。请参阅
        https://docs.didit.me/console/api-keys。

````

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