---
title: "Username to User ID"
method: GET
path: "/username-to-id/{user_handle}"
tags: ["Technical Endpoints"]
---

# Username to User ID

`GET /username-to-id/{user_handle}`

## Request

- Base URL: `https://api.sorsa.io/v3`
- URL: `https://api.sorsa.io/v3/username-to-id/{user_handle}`
- Auth: API key in header `ApiKey`
- TypeScript: <https://skmtc.dev/sorsa/apis/api-sorsa-io-2/docs/username-to-id/:user_handle/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns the unique Twitter/X user ID for a given username. You provide the username, and the endpoint returns the corresponding stable user ID.

Use cases:

Developers converting usernames into IDs before making other API requests; SaaS platforms normalizing user identifiers in databases; analytics tools storing stable IDs instead of usernames; automation systems resolving usernames to internal identifiers; data pipelines preparing consistent user references for further processing.

## Path parameters

- `user_handle` string, required

## Response `200`

OK

- TechnicalIDRes
  - `id` string

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `500`: Internal Server Error

---

[API](https://skmtc.dev/sorsa/apis/api-sorsa-io-2.md) - [All operations](https://skmtc.dev/sorsa/apis/api-sorsa-io-2/llms.txt) - [OpenAPI document](https://skmtc.dev/sorsa/apis/api-sorsa-io-2/revisions/3d7215317ba1?raw)
