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

# 控制用戶

> 控制用戶狀態（凍結/解凍/踢出）

<Accordion title="此 API 可能返回的錯誤代碼">
  | 代碼   | 說明            |
  | ---- | ------------- |
  | 0    | 成功            |
  | 2    | 無效參數          |
  | 19   | 請求次數已達上限      |
  | 20   | Secret key 錯誤 |
  | 21   | 非法用戶名稱        |
  | 25   | 類型參數錯誤        |
  | 36   | 伺服器錯誤         |
  | 9999 | 未知錯誤          |
</Accordion>


## OpenAPI

````yaml /seamless-openapi.json PUT /api/v1/dt/user/status
openapi: 3.1.0
info:
  title: 單一錢包 API
  description: 單一錢包（Seamless Wallet）API 文檔，包含 Game-API 和 Wallet-API
  version: 1.0.0
servers:
  - url: https://api.example.com
    description: API Server
security: []
tags:
  - name: Game-API User
    description: 遊戲 API - 用戶相關操作
  - name: Game-API Report
    description: 遊戲 API - 報表查詢
  - name: Game-API Internal
    description: 遊戲 API - 內部專用（隱藏）
  - name: Wallet-API
    description: 錢包 API - 由 vendor 實作
paths:
  /api/v1/dt/user/status:
    put:
      tags:
        - Game-API User
      summary: 控制用戶
      description: 控制用戶狀態（凍結/解凍/踢出）
      operationId: controlUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - uuid
                - platform_id
                - username
                - type
                - key
              properties:
                uuid:
                  type: string
                  description: 各平台自定義的唯一性請求序號
                platform_id:
                  type: string
                  description: 平台方的產品 ID
                username:
                  type: string
                  description: 用戶在遊戲中的帳號
                type:
                  type: string
                  description: 控制類型 0 - 啟用、1 - 禁用 (在線用戶強制斷線)、2 - 停用 (在線用戶不會強制斷線)
                key:
                  type: string
                  description: md5(type + username + 平台密鑰)
            example:
              uuid: e69da788a6c841d4953c475fc42bf464
              platform_id: AXTES
              username: player001
              type: '1'
              key: abc123hash
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GameApiResponse'
              example:
                error:
                  code: 0
                  msg: Success
                  uuid: e69da788a6c841d4953c475fc42bf464
        '400':
          description: 請求錯誤
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 2
                  msg: >-
                    request hash signature(0FACF22B9E3DB5CDC670A0F7A65BB76A) is
                    error
                  uuid: 9e96610f-5388-42df-b3ed-ba1b3178c63b
components:
  schemas:
    GameApiResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorInfo'
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: 錯誤代碼
        message:
          type: string
          description: 錯誤訊息
        data:
          description: 資料（通常為 null）
        status_code:
          type: integer
          description: HTTP 狀態碼
        service:
          type: string
          description: 服務名稱
    ErrorInfo:
      type: object
      properties:
        code:
          type: integer
          description: 錯誤碼
        msg:
          type: string
          description: 錯誤訊息
        uuid:
          type: string
          description: 請求序號

````