How to find your Telegram user ID, and the chat ID of a private group: write to a bot, call getUpdates and read from.id and chat.id. Neither can be looked up by name, so a bot has to receive a message first. The inspector below reads the IDs for you.
Send /newbot to @BotFather and keep the token it gives you.
Open the bot in Telegram and press Start.
Run the command shown in the inspector in a terminal, or open the URL yourself.
That positive number is your user ID. In a private chat, chat.id is the same number.
For a channel: add it as an administrator.
In groups send /start@yourbot — with privacy mode on, a bot only sees commands, mentions and replies. In a channel, post anything.
A negative number; −100… for supergroups and channels.
The ID stays valid.
Have a link to a message in that chat? Then you already have the ID: decode the message link.
Paste what getUpdates returned (or a single update or message). Every ID in it is listed. Read in your browser — nothing is uploaded.
1 · Fetch your bot's updates in a terminal# in your own terminal: $TOKEN is your bot's token, which never goes into this page curl -s "https://api.telegram.org/bot$TOKEN/getUpdates"
Telegram protects people and private chats from being looked up by name through the Bot API. A bot learns a user’s ID only when that user writes to it, or when the bot sees their message in a group. The same goes for a private group: the bot has to be in it.
message.from.id is your user ID, a positive number.Your ID is assigned when the account is created and never changes, even if you change your username or phone number.
Add your bot to the group. With privacy mode on, it only receives commands, so send /start@yourbot in the group. Call getUpdates: message.chat.id is the group’s ID. It is negative, and starts with -100 if the group is a supergroup.
Using the ID from the bot’s private chat for a group. In a private chat with a bot, chat.id equals your user ID. In the group, chat.id is the group’s own negative number, and from.id is still you.
A positive number that Telegram assigned to your account when it was created. It never changes, unlike your @username or phone number. It is not shown in the Telegram apps; a bot you write to receives it as from.id.
Not through the Bot API: a bot only learns the ID of people who wrote to it or whose messages it sees in a group. Programs that log in as a user account (MTProto) can resolve a public username, which is why an ID should not be treated as a secret.
Add your bot to the group, send /start@yourbot there and call getUpdates. message.chat.id is the group's ID — negative, and starting with −100 if the group is a supergroup.
No. Knowing an ID does not let anyone message you or log in. A bot can only write to a user who has started it first.
The lookup uses the Bot API's getChat, which answers for public channels and public groups by name. For people and private chats Telegram gives a bot no answer by name, so the site does not pretend to.
Not in the official apps’ settings. A bot you write to receives it as from.id, which is the reliable way to read it.