> ## 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.

# Convert Username to User ID

> Converts a Twitter/X username into the corresponding stable numeric user ID. Unlike usernames, user IDs never change, making them reliable for long-term storage and cross-referencing.



## OpenAPI

````yaml https://api.sorsa.io/v3/swagger.json get /username-to-id/{user_handle}
openapi: 3.0.3
info:
  contact: {}
  title: API Sorsa.io
  version: '3.0'
servers:
  - url: https://api.sorsa.io/v3
security: []
paths:
  /username-to-id/{user_handle}:
    get:
      tags:
        - Technical Endpoints
      summary: Convert Username to User ID
      description: >-
        Converts a Twitter/X username into the corresponding stable numeric user
        ID. Unlike usernames, user IDs never change, making them reliable for
        long-term storage and cross-referencing.
      parameters:
        - description: user_handle required
          in: path
          name: user_handle
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/technical.IDRes'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: Not Found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: Internal Server Error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    technical.IDRes:
      properties:
        id:
          description: Numeric Twitter/X user ID.
          example: '1'
          type: string
      type: object
    handler.ErrorResponse:
      properties:
        message:
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: ApiKey
      type: apiKey

````