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

> ## Agent Instructions
> Decodo provides web scraping and proxy infrastructure. For agent-specific guidance - which endpoint to call, how to authenticate, and the usage rules - read https://help.decodo.com/docs/for-agents.md.
> Add .md to any page URL on this site to get its Markdown source.
> Search these docs live over MCP at https://help.decodo.com/mcp.

# 验证子用户凭据

> 检查子用户的用户名和密码组合是否可用于代理身份验证。
凭据错误或检查本身失败时，`valid` 均为 `false`。




## OpenAPI

````yaml /cn/api-reference/cn-jero_public_api.yaml post /v2/users/sub-users/check-credentials
openapi: 3.1.0
info:
  title: Decodo公共API
  version: 2.0.0
  summary: 管理住宅代理子用户、白名单IP和订阅，并生成代理端点。
  description: >
    通过Decodo公共API，您可以管理Decodo账户的代理子用户和白名单IP，

    查看订阅详情，并生成可直接使用的代理连接字符串。


    ## 身份验证


    在控制台的 **Settings → API Keys** 中创建API密钥

    （https://dashboard.decodo.com/profile?tab=api-keys），并在每个请求的 `Authorization`
    请求头中按原样发送。

    请勿添加 `Bearer` 前缀。密钥是长度为140–180个字符的字母数字字符串。


    `/v2/endpoints*` 操作是公开的，不需要API密钥。


    ## 产品支持


    子用户、白名单IP和订阅相关操作适用于住宅代理产品。

    不支持数据中心代理和ISP代理产品。


    ## 单位


    流量值以十进制GB为单位（1 GB = 10^9字节），保留两位小数。


    ## 错误


    大多数错误使用 `Error` 对象（`error_code` 和 `message`）。`/v2/endpoints-custom*`
    操作的请求验证错误

    使用 `ValidationError` 对象。少数输入检查会返回纯JSON字符串，相关操作中会单独说明。
  contact:
    name: Decodo support
    url: https://decodo.com
servers:
  - url: https://api.decodo.com
    description: 生产环境
security:
  - ApiKeyAuth: []
tags:
  - name: 子用户
    description: 管理住宅代理订阅的代理子用户（用于代理身份验证的用户）。
  - name: 白名单 IP
    description: 管理无需用户名和密码即可使用住宅代理的IP地址。
  - name: 端点
    description: 列出代理入口点并生成代理连接字符串。这些操作不需要API密钥。
  - name: 订阅
    description: 查看订阅详情。
paths:
  /v2/users/sub-users/check-credentials:
    post:
      tags:
        - 子用户
      summary: 验证子用户凭据
      description: |
        检查子用户的用户名和密码组合是否可用于代理身份验证。
        凭据错误或检查本身失败时，`valid` 均为 `false`。
      operationId: check-sub-user-credentials
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckCredentialsRequest'
      responses:
        '200':
          description: 检查结果。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckCredentialsResult'
        '400':
          description: 缺少 `username`、`password` 或 `service_type`。响应体为纯JSON字符串。
          content:
            application/json:
              schema:
                type: string
              example: Wrong payload provided
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    CheckCredentialsRequest:
      type: object
      required:
        - username
        - password
        - service_type
      properties:
        username:
          type: string
          example: my_sub_user
        password:
          type: string
          example: Secret_Pass123
        service_type:
          type: string
          example: residential_proxies
    CheckCredentialsResult:
      type: object
      required:
        - valid
      properties:
        valid:
          type: boolean
          example: true
    Error:
      type: object
      required:
        - error_code
        - message
      properties:
        error_code:
          type: string
          enum:
            - bad_request
            - invalid_request_data
            - unauthorized
            - forbidden
            - not_found
            - internal_error
        message:
          type: string
          description: 便于阅读的错误描述。
        error:
          type: object
          description: 按字段名（`username`、`password`）分类的字段错误信息。
          additionalProperties:
            type: string
  responses:
    Unauthorized:
      description: API密钥缺失、格式错误或未被接受。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing:
              summary: No Authorization header
              value:
                error_code: unauthorized
                message: Api key not provided
            malformed:
              summary: Authorization header is not a valid API key
              value:
                error_code: unauthorized
                message: Invalid Api key provided
            rejected:
              summary: API key not accepted
              value:
                error_code: unauthorized
                message: Authorization header is invalid
    InternalError:
      description: 意外错误。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error_code: internal_error
            message: Unexpected error occurred
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: |
        在控制台（Settings → API Keys）中获取的API密钥，按原样发送，不加 `Bearer` 前缀。

````

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