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

# 用户 ID 转用户名

> 将 Twitter/X 数字用户 ID 转为账号当前用户名。适用于将已存储的 ID 解析为易读的用户名，尤其是用户名可能已经变更时。



## OpenAPI

````yaml openapi-zh-Hans.json GET /id-to-username/{user_id}
openapi: 3.0.3
info:
  contact: {}
  title: Sorsa.io API
  version: '3.0'
servers:
  - url: https://api.sorsa.io/v3
security: []
paths:
  /id-to-username/{user_id}:
    get:
      tags:
        - 实用工具
      summary: 用户 ID 转用户名
      description: 将 Twitter/X 数字用户 ID 转为账号当前用户名。适用于将已存储的 ID 解析为易读的用户名，尤其是用户名可能已经变更时。
      parameters:
        - description: user_id 必填
          in: path
          name: user_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/technical.HandleRes'
          description: 成功
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: 请求无效
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: 未授权
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: 禁止访问
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: 未找到
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: 请求过多
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: 服务器内部错误
      security:
        - ApiKeyAuth: []
components:
  schemas:
    technical.HandleRes:
      properties:
        handle:
          description: 当前 Twitter/X 用户名（不含 @）。
          example: elonmusk
          type: string
      type: object
    handler.ErrorResponse:
      properties:
        message:
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: ApiKey
      type: apiKey

````