How to find a Telegram chat ID for a user, group or channel
Send /start to @userinfobot for your own ID, forward a channel post to it for the channel ID, or add @GetIDsBot to a group. User IDs are positive, supergroup and channel IDs start with -100, and a chat ID is not a secret, unlike a bot token.
To find a chat ID, send /start to User Info Bot (@userinfobot) for your own ID, forward a post from a channel to the same bot for the channel's ID, or add GetIDs Bot (@GetIDsBot) to a group for the group's ID. If you have your own bot token, write to the bot, open the getUpdates address in a browser and read chat.id. User IDs are positive numbers, while supergroup and channel IDs start with -100. A chat ID is not a secret; the bot token is.
Which chat ID does the service need?
n8n, a monitoring script and your own bot all send messages through the Telegram Bot API, and its sendMessage method asks for a chat_id: the chat's number, or an @username for a public channel, supergroup or bot. The shape of the number tells you what kind of chat it points to. Telegram's documentation on Bot API dialog IDs defines the ranges:
| Chat | What the chat_id looks like | Example |
|---|---|---|
| A person (their private chat with the bot) | Positive number, equal to the user ID | 123456789 |
| Basic group | Negative number without -100 | -987654321 |
| Supergroup | -100 followed by the group's own number | -1001234567890 |
| Channel | -100 followed by the channel's own number | -1001987654321 |
| Topic in a group with topics | The group's ID plus a separate message_thread_id |
-1001234567890 and 42 |
| Public channel or supergroup | The number or the @username | @channelname |
Three things catch people out:
- The number is long. Telegram warns that a chat ID can exceed 32 bits and that some programming languages silently corrupt it. A signed 64-bit integer, a double or a string is safe.
- A private chat has the person's ID. When a service writes to you through a bot, the
chat_idis simply your user ID. - A group can change its ID. When a basic group is upgraded to a supergroup, it gets a new ID with -100, and messages to the old one fail.
The -100 isn't decoration. Telegram converts a channel's internal number to the Bot API format by adding 1,000,000,000,000 and making it negative, which is why a number copied from somewhere without the prefix won't work as it is.
How do I find my own Telegram ID?
You need your own ID when a service should message you in private: an alert from a server, a new order, a failed backup.
- Open User Info Bot (@userinfobot) and tap Start.
- The bot replies with your account details. Copy the number next to your ID.
- Open the bot that the service will use and tap Start there as well.
Most tutorials skip the third step. Bots can't start conversations with users: a person has to write to the bot first, so until you do, the service can't reach you even with the correct ID.
GetIDs Bot (@GetIDsBot) gives the same answer to /start. Both bots are free and show no ads.
Someone else's ID, for example a colleague you want on your bot's allow-list, works the same way: forward one of their messages to User Info Bot, and it shows the sender's ID. If the person has set Settings > Privacy and Security > Forwarded Messages to Nobody, the forward carries only their name, and no bot can see the account. Ask them to tap Start in User Info Bot themselves and send you the number.
How do I find a group's chat ID?
With a bot
- Add GetIDs Bot (@GetIDsBot) to the group like any other member. If you haven't done it before, here is how to add a bot to a Telegram group.
- Once it joins, the bot gives you the group's ID. Copy it together with the minus sign.
- Remove the bot from the group if it has no other job there.
Telegram Bot Raw (@RawDataBot) is the route n8n's documentation suggests: invite it to the group, and it answers with the raw JSON of the update, where the id inside chat is the group ID.
In Telegram Web
- Open the WebA version of Telegram at web.telegram.org/a/ and log in.
- Open the group.
- Look at the address bar. Everything after
#is the chat ID, for exampleweb.telegram.org/a/#-1001234567890.
WebA builds this address from the same IDs the Bot API uses, so the minus and the -100 are already in place. If a tutorial tells you to take the digits after the letter "g" and add a minus, it describes an older web interface. In a group with topics, the address of an open topic ends in an underscore and the topic's ID: #-1001234567890_42.
In Telegram Desktop
Telegram Desktop for Windows, macOS and Linux (not the separate Telegram for macOS app) can show IDs in profiles:
- Open Settings > Advanced > Experimental settings.
- Turn on Show Peer IDs in Profile. This option is in English whatever your interface language.
- Open the group's profile. Below the description you'll see
id:and a number; click the number to copy it.
Desktop shows Telegram's internal number without the Bot API sign and prefix: put -100 in front for a supergroup or channel, or a minus for a basic group. If you can't tell which kind of group you have, take the ID from WebA or a bot instead, where it comes ready to use. Telegram itself warns that experimental settings may break or disappear in a later version.
How do I find a channel's chat ID?
A public channel often doesn't need a number, because the Bot API accepts its @username as chat_id. A private channel has no username, so you need the ID:
- Open the channel and choose Forward on any post.
- Send the post to User Info Bot (@userinfobot) or GetIDs Bot (@GetIDsBot).
- The reply contains the channel's ID.
JsonBOT (@JsonBot) answers a forwarded message with the whole raw data Telegram attaches to it, identifiers included, which helps if you want to see the full structure.
If the channel has Restrict saving content turned on, its posts can't be forwarded. Two ways still work:
- A post link. Tap Copy Link on a post (Copy Post Link in Telegram Desktop). A private channel's link looks like
t.me/c/1987654321/15: the first number is the channel, the second is the post. Put -100 in front of the channel number to get-1001987654321. Private supergroups use the same kind of link (Copy Message Link on Desktop). - WebA. Open the channel at web.telegram.org/a/ and read the address bar, as with a group.
Knowing the ID is half the job. The bot that will post also has to be in the channel, and Telegram adds bots to channels only as admins.
How do I get a chat ID from my own bot?
If you already have a token (if not, here is how to create a bot and get its token), Telegram will tell you any chat's ID directly, with no third-party bot involved:
- Get a message from the chat to your bot. In a private chat, tap Start. In a group, add the bot and send a command addressed to it, such as
/start@YourBot. In a channel, add the bot as an admin and publish a post. - In a browser, open
https://api.telegram.org/bot<token>/getUpdates, replacing<token>with your bot's token. - Find
"chat"in the response. Itsidis the chat ID with the sign and prefix included, andtypesays whether it isprivate,group,supergrouporchannel.
"chat": {
"id": -1001234567890,
"title": "Build alerts",
"type": "supergroup"
}
A few rules from the getUpdates documentation explain most empty or failed responses:
- Privacy mode. By default, a bot in a group mostly sees commands meant for it, replies to its messages and service messages, such as the one about its own arrival. A bot that is an admin sees everything. Ordinary chatter doesn't reach a regular bot, which is why step 1 uses a command.
- 24 hours. Telegram keeps undelivered updates for a day at most. If the list is empty, write to the bot again and reload the page.
- Webhooks. getUpdates doesn't work while the bot has a webhook, and an n8n Telegram Trigger sets one. Telegram then answers with a
Conflicterror. Take the chat ID from the trigger's output, which n8n's documentation says includes it, or use one of the bots above. - Topics. A message sent in a topic also carries
message_thread_id. Pass it next tochat_idto post into that topic.
The address in step 2 contains your token, and the token is the key to your bot. Don't paste that link into chats, screenshots or shared documents, and if it leaks, issue a new token in @BotFather.
What if the chat ID doesn't work?
The Bot API answers a failed request with a short error description. The usual ones:
- "chat not found". Check the format against the table: a supergroup or channel needs -100, a basic group needs its minus. Also make sure the token belongs to the bot that is actually in that chat.
- "bot is not a member of the channel chat" (or "supergroup chat"). Add the bot to the chat, and to a channel as an admin.
- "bot can't initiate conversation with a user". The person hasn't tapped Start in your bot yet.
- "group chat was upgraded to a supergroup chat". The group now has a new -100 ID, and Telegram includes it in the same error as
migrate_to_chat_id. Replace the old ID in your settings. Telegram apps upgrade a basic group on their own when an admin uses something only supergroups have, such as a public link or topics. - The bot shows no ID for a forwarded message. The sender hides their account in the Forwarded Messages privacy setting. Ask them to open the bot themselves.
- The message lands in the general topic instead of the right one. Add
message_thread_idwith the topic's ID. - The ID arrives mangled in your code. A 13-digit negative number overflows a 32-bit integer. Store it as a 64-bit integer or as text.
Where to go next
If you're picking other helpers for bot work, such as JSON formatters or Base64 encoders, compare them in the developer tools rating. And if the bot itself is still being set up, BotFather vs User Info Bot shows which of the two you need at which step.



