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

# 接受共享用户邀请

> POST /multi-users/accept-invitation/

在 **Management API** 主机（`api.scanova.io`）上接受共享用户邀请并设置团队成员的密码。

```
POST https://api.scanova.io/multi-users/accept-invitation/
```

<Warning>
  与本页上的所有其他端点不同，此端点**不**需要 Management API 密钥——它是 `AllowAny`。它旨在从受邀团队成员自己的浏览器中调用，通过其邀请邮件中的链接调用，而不是从发起邀请的账户的集成中调用。
</Warning>

<ParamField body="hash" type="string" required>
  来自邮件链接的邀请哈希，最多 250 个字符。
</ParamField>

<ParamField body="password1" type="string" required>
  团队成员的新密码。
</ParamField>

<ParamField body="password2" type="string" required>
  密码确认——必须与 `password1` 一致。
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.scanova.io/multi-users/accept-invitation/" \
    -H "Content-Type: application/json" \
    -d '{
      "hash": "a1b2c3d4e5f6...",
      "password1": "correct-horse-battery-staple",
      "password2": "correct-horse-battery-staple"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  "Invitation accepted"
  ```
</ResponseExample>

## 哈希有效性

哈希仅在存在、尚未被使用，且在账户配置的邀请链接有效期窗口内发送时才有效——无论是最初的邀请还是任何[重新发送](/zh/api-reference/management-api/shared-users/resend-invitation)都会刷新计算该窗口的时间戳。如果哈希未通过上述任一检查，或两个密码不匹配或不符合密码策略，则返回 `400`，并附带 `"Verification link is invalid or expired."`。

## 相关内容

* [邀请共享用户](/zh/api-reference/management-api/shared-users/invite)——邮件链接中哈希的来源。
* [重新发送共享用户的邀请邮件](/zh/api-reference/management-api/shared-users/resend-invitation)——如果原始邀请已过期，获取新的哈希。
* [Management API 概览](/zh/api-reference/management-api/overview)——此端点特意**不**使用的身份验证方案。


## OpenAPI

````yaml api-reference/openapi/management-api.json POST /multi-users/accept-invitation/
openapi: 3.1.0
info:
  title: Scanova Management API (v2)
  description: >-
    The complete Scanova Management API — every endpoint available at
    api.scanova.io (QR codes, folders, tags, leads, forms, analytics, plans,
    shared users & roles), plus the token-creation and usage-stats endpoints
    used to authenticate against it. Every path and request/response shape below
    was verified live against a real API key and the actual running backend
    (Phase 7, 2026-08-16) — not guessed from reading urls.py alone.
  version: 2.0.0
servers:
  - url: https://api.scanova.io
    description: Management API — QR/folder/tag/lead/form/analytics/plans endpoints
security:
  - apiKeyAuth: []
paths:
  /multi-users/accept-invitation/:
    post:
      summary: Accept a shared-user invitation
      description: >-
        Public endpoint — no Management API key required — called by the invited
        teammate's browser from the link in their invitation email, not by the
        inviting account's own integration.
      operationId: acceptManagedInvitation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                hash:
                  type: string
                  maxLength: 250
                  description: The invitation hash from the emailed link.
                password1:
                  type: string
                password2:
                  type: string
              required:
                - hash
                - password1
                - password2
            example:
              hash: a1b2c3d4e5f6...
              password1: correct-horse-battery-staple
              password2: correct-horse-battery-staple
      responses:
        '200':
          description: Invitation accepted — the shared user can now log in.
        '400':
          description: >-
            Hash invalid/already used/expired (per
            INVITATION_LINK_VALIDITY_DAYS), or the two passwords don't
            match/fail policy.
      security: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Send your Management API key as the raw value of the Authorization
        header — no "Bearer " or "Token " prefix, and no other characters.
        Example: `Authorization: 401f7ac837da42b97f613d789819ff93537bee6a`. A
        header containing more than one space-separated part is rejected
        outright. Requests also require the request's Host header to be the
        management API host (e.g. api.scanova.io) — the same key sent to the
        regular API host will not authenticate.

````