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

# 获取人工介入表单

> 使用 `human_input_required` 事件返回的 `form_token` 获取暂停中的人工介入表单内容。需要 **WebApp** 送达方式。



## OpenAPI

````yaml /zh/3.10.x/develop/api/openapi_workflow.json get /form/human_input/{form_token}
openapi: 3.0.1
info:
  title: 工作流应用 API
  description: 工作流应用提供无会话支持，适用于翻译、文章写作、摘要 AI 等场景。
  version: 1.0.0
servers:
  - url: https://{api_base_url}
    description: 工作流应用 API 的基础 URL。
    variables:
      api_base_url:
        default: api.dify.ai/v1
        description: API 基础 URL 的主机与路径，不含 `https://` 前缀。
security:
  - ApiKeyAuth: []
tags:
  - name: 工作流
    description: 用于执行和管理工作流的操作。
  - name: 文件操作
    description: 文件上传和下载操作。
  - name: 终端用户
    description: 终端用户信息相关操作。
  - name: 语音与文字转换
    description: 语音转文字和文字转语音转换。
  - name: 应用配置
    description: 应用设置、参数和元数据。
  - name: 人工介入
    description: 暂停等待人工输入的工作流恢复操作。
paths:
  /form/human_input/{form_token}:
    get:
      tags:
        - 人工介入
      summary: 获取人工介入表单
      description: >-
        使用 `human_input_required` 事件返回的 `form_token` 获取暂停中的人工介入表单内容。需要
        **WebApp** 送达方式。
      operationId: getWorkflowHumanInputForm
      parameters:
        - name: form_token
          in: path
          required: true
          schema:
            type: string
          description: >-
            暂停表单的访问令牌，由流式模式下 [执行工作流](/api-reference/工作流/执行工作流) 返回的
            `human_input_required` 事件提供。
      responses:
        '200':
          description: 表单内容获取成功。
          content:
            application/json:
              schema:
                type: object
                properties:
                  form_content:
                    type: string
                    description: 已替换工作流变量的预渲染表单正文。
                  inputs:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          description: >-
                            表单输入控件类型。可用值：`text_input`（单行文本输入框）和
                            `paragraph`（多行文本区域）。
                        output_variable_name:
                          type: string
                          description: 引用该输入提交值在工作流中使用的变量名。对应提交 `inputs` 对象中的键。
                        default:
                          type: object
                          nullable: true
                          description: 从工作流上下文解析得到的默认值。未配置默认值时为 `null`。
                          properties:
                            type:
                              type: string
                              description: >-
                                默认值来源。`constant` 表示将 `value` 作为字面字符串；`variable`
                                表示 `selector` 指向工作流变量。
                            selector:
                              type: array
                              items:
                                type: string
                              description: >-
                                当 `type` 为 `variable` 时，变量引用路径（例如 `["node_id",
                                "var_name"]`）。至少包含两个元素。
                            value:
                              type: string
                              description: 当 `type` 为 `constant` 时的字面默认值。始终为字符串。
                    description: 表单输入字段定义。
                  resolved_default_values:
                    type: object
                    additionalProperties:
                      type: string
                    description: 预填充默认值，按输入的 `output_variable_name` 分组。所有值均为字符串。
                  user_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          maxLength: 20
                          pattern: ^[A-Za-z_][A-Za-z0-9_]*$
                          description: >-
                            操作按钮的标识。当接收者选择该按钮时，作为 `action` 传入
                            [提交人工介入表单](/api-reference/人工介入/提交人工介入表单)。
                        title:
                          type: string
                          maxLength: 100
                          description: 显示给接收者的按钮文本。
                        button_style:
                          type: string
                          description: 按钮视觉样式。可用值：`primary`、`default`、`accent`、`ghost`。
                    description: 可用的提交操作。
                  expiration_time:
                    type: integer
                    format: int64
                    description: Unix 时间戳（秒），超过后无法再提交该表单。
              examples:
                success:
                  summary: 响应示例
                  value:
                    form_content: Please review the draft and confirm or request changes.
                    inputs:
                      - type: text_input
                        output_variable_name: comment
                        default:
                          type: constant
                          selector: []
                          value: ''
                    resolved_default_values:
                      comment: ''
                    user_actions:
                      - id: approve
                        title: Approve
                        button_style: primary
                      - id: reject
                        title: Request changes
                        button_style: default
                    expiration_time: 1745510400
        '404':
          description: '`not_found` : Form not found.'
          content:
            application/json:
              examples:
                not_found:
                  summary: not_found
                  value:
                    status: 404
                    code: not_found
                    message: Form not found
        '412':
          description: >-
            - `human_input_form_submitted` : Form already submitted. Forms are
            one-shot; the first response wins regardless of which user submits
            it.

            - `human_input_form_expired` : The form's expiration time passed
            before submission arrived.
          content:
            application/json:
              examples:
                human_input_form_submitted:
                  summary: human_input_form_submitted
                  value:
                    status: 412
                    code: human_input_form_submitted
                    message: >-
                      This form has already been submitted by another user,
                      form_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890
                human_input_form_expired:
                  summary: human_input_form_expired
                  value:
                    status: 412
                    code: human_input_form_expired
                    message: >-
                      This form has expired,
                      form_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890
components:
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API_KEY
      description: >-
        API Key 认证。对于所有 API 请求，请在 `Authorization` HTTP 头中包含您的 API Key，并加上
        `Bearer ` 前缀。示例：`Authorization: Bearer {API_KEY}`。**强烈建议将 API Key
        存储在服务端，不要在客户端共享或存储，以避免 API Key 泄漏导致严重后果。**

````