> ## 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 个人资料 URL 提取稳定的数字用户 ID。适用于在后续 API 调用前，将个人资料链接规范化为一致的标识符。



## OpenAPI

````yaml openapi-zh-Hans.json GET /link-to-id
openapi: 3.0.3
info:
  contact: {}
  title: Sorsa.io API
  version: '3.0'
servers:
  - url: https://api.sorsa.io/v3
security: []
paths:
  /link-to-id:
    get:
      tags:
        - 实用工具
      summary: 个人资料链接转用户 ID
      description: 从 Twitter/X 个人资料 URL 提取稳定的数字用户 ID。适用于在后续 API 调用前，将个人资料链接规范化为一致的标识符。
      parameters:
        - description: link 必填
          in: query
          name: link
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/technical.LinkToIDResp'
          description: 成功
        '400':
          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: 未找到
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: 服务器内部错误
      security:
        - ApiKeyAuth: []
components:
  schemas:
    technical.LinkToIDResp:
      properties:
        id:
          description: Twitter/X 数字用户 ID。
          type: string
      type: object
    handler.ErrorResponse:
      properties:
        message:
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: ApiKey
      type: apiKey

````