What Is a Telegram User ID?
Every Telegram account is assigned a unique numeric identifier called a User ID when the account is created. This ID is a positive integer (for example, 123456789) that never changes, even if you modify your username, phone number, or display name. It is fundamentally different from your @username, which is a public handle you choose and can change at any time.
The User ID is used internally by Telegram and its Bot API for all operations: sending messages, managing group members, verifying identity, and routing notifications. If you are a developer building bots, integrating with AI agents, or automating workflows, you will need User IDs rather than usernames.
User ID vs Username vs Phone Number
Telegram uses three types of identifiers, and understanding the difference is important:
- User ID — A permanent numeric identifier (e.g., 123456789). Assigned by Telegram. Cannot be changed. Used by bots and APIs. Not visible in the app UI by default.
- Username — An optional public handle starting with @ (e.g., @johndoe). Chosen by the user. Can be changed or removed. Used for public discovery and sharing.
- Phone Number — Required for account creation and login. Can be changed. Can be hidden from other users. Not used in the Bot API.
For any technical integration, always use the numeric User ID. Usernames can change, and phone numbers are private. Only the User ID is guaranteed to be stable and accessible via the API.
How to Find Someone Else's Telegram ID
Finding another user's Telegram ID requires one of these approaches:
- Forward their message — Forward a message from the target user to @userid_checkbot. The bot reads the forwarded message metadata and extracts the sender ID.
- Use our web lookup tool — Works for public channels and groups. Enter the @username in the web lookup tool to retrieve the numeric ID.
- Use the API — Call the Telegram Bot API getChat method with a public @username:
getChat?chat_id=@username. Note: this only works for channels, groups, and users who have messaged your bot.
Note that some users have privacy settings that prevent their ID from being extracted via forwarded messages. In those cases, the only way to get their User ID is to have them message a bot directly (like @userid_checkbot) or use the Bot API getUpdates after they message your bot. The web lookup tool only works for public channels and groups, not individual users.
How to Find a Group or Channel ID
Group and Channel IDs are negative numbers (supergroups and channels start with -100). Here is how to find them:
- Forward method — Forward any message from the group or channel to @userid_checkbot
- Add a bot — Add your bot to the group, send a message, and call
getUpdateson the Bot API. Thechat.idfield is the Group ID - Web lookup — If the group or channel has a public @username, use the web lookup tool to find its ID
- Web Telegram — Open the group in web.telegram.org and check the URL for the numeric ID
Why Your Telegram User ID Matters
Your Telegram User ID is essential for a wide range of technical and practical use cases:
- Bot development — Bots use User IDs to send messages, manage permissions, and identify users reliably
- AI agent setup — Platforms like OpenClaw, Hermes, and Claude-powered bots require your ID for whitelisting and authentication
- Group administration — Admin bots need User IDs to ban, mute, or promote members in groups
- Notification services — CI/CD pipelines, monitoring tools, and alert systems push notifications to your User ID via the Bot API
- API integrations — Any app using the Telegram Bot API needs numeric IDs for all operations
- Security verification — Services verify your identity using your permanent User ID rather than a changeable username
Common Issues and Troubleshooting
The bot is not responding
If @userid_checkbot does not respond, try sending /start again. If the issue persists, the bot may be experiencing high traffic. Use the web lookup tool as an alternative.
Forwarded message does not show ID
If the forwarded message does not reveal a User ID, the sender has enabled "Restrict Forwarding" in their privacy settings. The only alternative is to ask them to message @userid_checkbot directly and share their ID with you.
The ID I found is negative
Negative IDs indicate groups or channels, not individual users. Group IDs are negative (e.g., -1001234567890). User IDs are always positive numbers. Check our Group ID guide or Channel ID guide for more details.
Can I look up a user by phone number?
The Bot API does not support looking up users by phone number. You need either their @username or a message from them (forwarded to a bot) to find their User ID.
Developers: Using the Telegram Bot API for ID Lookup
If you are building an application that needs to resolve usernames to IDs, here is how to use the Bot API:
// Resolve @username to User ID
GET https://api.telegram.org/bot<TOKEN>/getChat?chat_id=@username
// Response includes:
// { "ok": true, "result": { "id": 123456789, "type": "private", "username": "johndoe", "first_name": "John" } }
You can also extract User IDs from incoming messages to your bot. Every message object includes message.from.id which is the sender User ID. For bot development, storing User IDs in a database enables features like user preferences, message history, and access control.
Privacy Considerations
Your Telegram User ID is not a secret, but it is also not publicly displayed in the app. Here is what you should know about ID privacy:
- Anyone you message (including bots) can see your User ID
- Your User ID alone cannot be used to message you or find your account
- Bots need your User ID AND a valid bot token to send you messages
- Group admins can see member User IDs through admin tools and bots
- User IDs are not linked to phone numbers or email addresses in the public API
In general, sharing your User ID is safe for technical integrations. It is no more sensitive than sharing your email address, and significantly less sensitive than sharing your phone number.