Retour

How to Find a Telegram Group or Chat ID Using a Bot


Every Telegram chat — a group, supergroup, channel, private conversation, or forum topic — has a numeric ID behind it, and that ID is what bots, webhooks, and automation platforms actually use to send messages or trigger actions. This guide covers the official ways to find that ID, from the simplest bot-based method to the Bot API calls developers wire into real integrations.

What Is a Telegram Chat ID?

Short answer: a Chat ID is the unique numeric identifier Telegram assigns to every chat — it’s what bots and APIs use internally instead of a name or username, which can change.

A few distinctions matter once you’re working with automation:

  • User ID: identifies an individual account, used when a bot sends a direct message to a specific person.

  • Group ID: identifies a basic group chat, represented as a negative number (for example, -123456789).

  • Supergroup ID: identifies a supergroup, formatted with a -100 prefix (for example, -1001234567890) to distinguish it at a glance from a basic group.

  • Channel ID: also uses the -100 prefix, since channels and supergroups share the same underlying chat type internally.

  • Topic ID: technically a message_thread_id, identifying a specific thread inside a forum-enabled supergroup rather than the group as a whole.

ID Type

Example Use

User ID

Bots sending direct messages

Group ID

Group automation and moderation

Channel ID

Channel posting and scheduling

Topic ID

Forum topic-specific automation

How to Get a Telegram Group ID Using a Bot

Short answer: the fastest method for non-developers is adding a small utility bot to your group — it replies with the group’s Chat ID almost immediately, no API calls required.

  1. Create or use a Telegram bot. You can create a new bot through @BotFather in a couple of minutes, or use an existing, purpose-built ID-lookup bot (several are commonly used for exactly this — search Telegram for one rather than following an unofficial download link).

  2. Add it to the group. Add the bot as a member the same way you’d add any other participant.

  3. Send a message. Post any message in the group, or trigger the command the bot expects (commonly /id for dedicated ID-lookup bots).

  4. Retrieve the Chat ID. The bot replies with the group’s numeric ID, which you can then copy into whatever automation or platform needs it.

This works because any bot that’s a member of a group receives that group’s Chat ID as part of every message it’s sent — dedicated ID bots simply read that value back to you instead of doing anything else with it.

How to Get a Telegram Group Chat ID with Bot API

Short answer: developers typically pull the Chat ID directly from the Bot API, either by reading it off an incoming update with getUpdates or by looking it up explicitly with getChat.

  • getUpdates: returns a list of recent updates your bot has received, including messages sent in any chat it’s part of. Each message object includes a chat field with the numeric id — this is the simplest way to capture a Chat ID the first time your bot receives a message from a new group.

  • getChat: looks up current information about a specific chat when you already have its ID or public @username, returning a ChatFullInfo object with the chat’s id, type, title, and other metadata.

  • Chat ID in the API response: in both cases, the ID appears as a signed integer field named id, nested inside the chat object of a message or as the top-level id of a getChat response.

  • Chat ID format: basic groups return a negative number; supergroups and channels return a negative number prefixed with 100. Bots should treat this as an opaque integer rather than parsing meaning out of its digits, since Telegram’s own format is the only thing that determines it.

Use getUpdates when you don’t yet have any way to reach the chat and need to capture its ID from an incoming message. Use getChat when you already have an ID or username and want to confirm or refresh information about that chat.

How to Use the getChat Method

Short answer: getChat takes a single required parameter — the chat’s ID or public username — and returns full, current information about that chat.

  • Endpoint purpose: fetches up-to-date details about a chat: its type, title, description, member-related settings, and more.

  • Required parameter: chat_id — either the numeric Chat ID or, for public supergroups and channels, the @username.

  • Chat ID or username: if you don’t yet know the numeric ID, using the public @username (where one exists) is a valid way to call getChat and get the numeric ID back in the response.

  • Response fields: the returned ChatFullInfo object includes id, type (private, group, supergroup, or channel), title, and — depending on the chat — fields like description, invite_link, and permissions.

A simple request:

https://api.telegram.org/bot<YOUR_TOKEN>/getChat?chat_id=@your_group_username

A simplified response:

{
  "ok": true,
  "result": {
    "id": -1001234567890,
    "type": "supergroup",
    "title": "Example Group"
  }
}

How to Find a Private Telegram Group ID

Short answer: private groups don’t have a public username to query, so the only official way to get their ID is having your bot already inside the group and reading the ID off an incoming update.

  • Private groups: have no public @username, so getChat can’t be called with a username — you need the numeric ID, which means capturing it from a message the bot receives while it’s a member.

  • Public groups: can be looked up by @username directly with getChat, even before your bot has received any messages there.

  • Invite-only groups: function the same as private groups for this purpose — being inside the group (as a member or admin bot) is what lets you retrieve the ID, not the invite link itself.

In practice: add your bot to the private group, have it observe (or send) one message, and pull the ID from that message’s chat.id field via getUpdates or a webhook.

How to Find a Telegram Channel ID

Short answer: public channels can be looked up by username with getChat; private channels require the bot to be an admin and to capture the ID the same way as a private group.

  • Public channel username: call getChat with chat_id=@yourchannelname to get the channel’s numeric ID directly.

  • Private channel: has no public username, so the bot needs to be added as an admin, and the ID is captured from a post or update the bot receives, the same pattern used for private groups.

  • Channel ID format: uses the same -100-prefixed format as supergroups.

  • Posting bots: once you have the channel’s numeric ID, bots with posting rights use it as the chat_id parameter for sendMessage and related methods to publish content.

How to Find a Telegram Topic ID

Short answer: a Topic ID (the message_thread_id) identifies a specific thread inside a forum-enabled supergroup, and your bot picks it up automatically from any message sent inside that topic.

  • Topic IDs: every message sent inside a forum topic includes a message_thread_id field and is_topic_message: true, distinguishing it from a message posted to the group’s general area.

  • Forum groups: must have the “Topics” feature enabled (the group’s Chat object includes is_forum: true) for topic IDs to exist at all.

  • Bot API usage: send getUpdates a message inside the specific topic you care about, then read message_thread_id off that update — there’s no separate lookup call for an existing topic’s ID beyond seeing it referenced in a message.

  • Topic-specific automation: once you have the ID, pass it as the message_thread_id parameter on sendMessage and similar methods to reply inside that exact topic rather than the group’s main thread.

Where Are Telegram Chat IDs Used?

Chat IDs are the connective tissue between Telegram and almost every external tool an admin or developer might use:

  • Welcome bots: use the group’s Chat ID to know where to post a greeting when someone joins.

  • Moderation bots: reference the Chat ID to apply rules and actions to the correct group.

  • Webhooks: Telegram delivers updates — including the Chat ID — to your webhook endpoint so your server knows which chat an event came from.

  • Google Apps Script: commonly used to post scheduled or triggered messages to a group or channel by Chat ID.

  • Zapier, Make, and n8n: each of these automation platforms needs the numeric Chat ID configured in a “Send Telegram Message” step to know where output should go.

  • CRM integrations: teams routing notifications (new leads, support tickets, alerts) into a Telegram group typically configure the destination using its Chat ID.

Common Telegram Chat ID Problems

Problem

Cause

Solution

Bot returns no Chat ID

Bot hasn’t received any message from the chat yet

Send a message in the chat after adding the bot, then call getUpdates again

Chat ID changes after migration

A basic group was converted to a supergroup, which assigns a new ID

Read the new ID from the migrate_to_chat_id field in the service message, and update stored IDs

Private group not detected

Bot isn’t a member, or hasn’t seen a message yet

Confirm the bot has been added and has received at least one update from the group

Wrong Chat ID format

Missing the -100 prefix for a supergroup or channel, or using a positive number

Use the exact signed integer Telegram returns — don’t reconstruct or guess the format

Frequently Asked Questions

What is a Telegram Group ID?

A numeric identifier Telegram assigns to a group chat, used by bots and automation tools to reference that specific group instead of its name, which can change.

How do I get a Telegram Group ID with a bot?

Add a bot to the group and send a message — the bot receives the group’s Chat ID with that message and can report it back to you, either through a dedicated ID-lookup bot or your own bot’s getUpdates response.

Can I get a private Telegram Group ID?

Yes, but only by having a bot already inside the group and capturing the ID from an incoming message — private groups have no public username to query directly.

What’s the difference between Chat ID and Group ID?

“Chat ID” is the umbrella term covering the numeric identifier for any type of chat — private, group, supergroup, or channel. “Group ID” specifically refers to a Chat ID belonging to a group or supergroup.

What is getChat?

A Bot API method that returns up-to-date information about a chat — including its numeric ID, type, and title — when you provide either the ID or a public username.

What is getUpdates?

A Bot API method that returns recent updates (like messages) your bot has received, which is the standard way to capture a chat’s ID the first time it interacts with your bot.

How do I find a Telegram Topic ID?

Send or receive a message inside the specific forum topic, then read the message_thread_id field from that message via getUpdates or your webhook.

Can I get a Telegram Group ID online?

Some web-based tools claim to do this, but the reliable, official approach is always through a bot that’s a member of the group — Telegram doesn’t expose Chat IDs through a public lookup website.


If your bot setup also touches member visibility or growth, our Member List article, Add Members Guide, and Hide Members Guide cover related Bot API behavior, and our Telegram Limits Guide is useful background once you’re building automation that sends messages at scale. Admins managing larger Telegram communities alongside this kind of automation may also find SMMTO’s Telegram growth and management resources worth a look.

Chat en direct Support 24/7