Skip to content

How to Get a Group or Channel ID ​

TL;DR:

  • Public groups/channels: use the @username format (e.g. @mygroup).
  • Private groups/channels: open Telegram Web, navigate to the chat — the numeric ID is in the URL.
  • The bot must be an administrator in the group or channel before any admin actions can work.

Who this is for ​

  • Bot builders who use Telegram Admin Actions (ban user, unban, approve/decline join requests) in their scenarios.
  • Anyone who needs to connect their bot to a Telegram group or channel.

What you will learn ​

  • What a Telegram Chat ID looks like and why it matters.
  • How to find the ID for both public and private groups/channels.
  • How to add your bot as an administrator.

Overview ​

Every Telegram group and channel has a unique identifier — the Chat ID. When you configure a Telegram Admin Action in the Actions node, you enter this ID so the bot knows which group or channel to act on.

There are two formats depending on the chat type:

Chat TypeID FormatExample
Public group or channel@username@mygroup
Private group or supergroupNumeric ID (negative)-1001234567890
Private channelNumeric ID (negative)-1009876543210

WARNING

Private groups and channels always have a negative numeric ID. If you see a positive number, you are likely reading the wrong value.

How to find the ID ​

For public groups and channels ​

If your group or channel has a public username, you can use it directly in the format @username.

Steps:

  1. Open the group or channel in Telegram.
  2. Go to Group Info (or Channel Info).
  3. Find the username — it starts with @ (e.g. @myawesomegroup).
  4. Use this value as-is in the Chat ID field.

For private groups, supergroups, and channels ​

Private chats do not have public usernames, so you need the numeric ID.

Steps using Telegram Web:

  1. Open web.telegram.org in your browser.

  2. Sign in with your Telegram account.

  3. Find and open your group or channel in the left sidebar.

  4. Look at the browser address bar. The URL will look like one of these:

    https://web.telegram.org/a/#-1001234567890
    https://web.telegram.org/k/#-1001234567890
  5. The number after # is your Chat ID, including the minus sign. For example: -1001234567890.

TIP

Always copy the full number including the leading - (minus sign). Without it, the bot will not find the chat.

Finding the ID via a bot (alternative method) ​

You can also use a helper Telegram bot to retrieve the ID:

  1. Add @userinfobot or @RawDataBot to your group.
  2. The bot will reply with the group's numeric ID.
  3. Remove the bot from the group when done.

What the ID looks like ​

Here are examples of valid Chat IDs:

@publicgroup           ← public group by username
@mychannel             ← public channel by username
-1001234567890         ← private supergroup or channel (numeric)
-987654321             ← private group (numeric, older format)

WARNING

Some tools display the ID without the -100 prefix (e.g. 1234567890 instead of -1001234567890). Always use the full negative number when pasting into the Chat ID field.

How to add your bot as an administrator ​

Telegram Admin Actions (ban, unban, approve/decline join requests) require your bot to have admin rights in the target group or channel. Without this, all actions will silently fail.

Steps:

  1. Open the group or channel in Telegram (app or web).
  2. Go to Group Info → Administrators (for groups) or Channel Info → Administrators (for channels).
  3. Tap Add Administrator.
  4. Search for your bot by its username (e.g. @myawesomebot) and select it.
  5. Grant the required permissions:
ActionRequired permission
Ban userBan users (can_restrict_members)
Unban userBan users (can_restrict_members)
Approve join requestInvite users via link (can_invite_users)
Decline join requestInvite users via link (can_invite_users)
  1. Save the changes.

TIP

For simplicity during setup, you can grant all permissions. You can restrict them later once you know exactly what your scenario needs.

Examples ​

Example 1 — Private supergroup ​

Goal: Use the numeric ID of a private group for an Approve join request action.

Steps:

  1. Open the group in Telegram Web.
  2. URL shows: https://web.telegram.org/a/#-1009876543210
  3. Copy -1009876543210 and paste it into the Chat ID field in your Actions node.

Example 2 — Public channel ​

Goal: Ban a user from a public channel after they complete a scenario step.

Steps:

  1. The channel username is @myproductchannel.
  2. Enter @myproductchannel in the Chat ID field.
  3. Ensure your bot is an admin in that channel with Ban users permission.

Troubleshooting ​

Action has no effect (no error shown) ​

Cause: The bot is not an administrator in the specified group/channel, or the Chat ID is incorrect. Fix: Verify bot admin status, then double-check the Chat ID in Telegram Web.

"Chat not found" error in logs ​

Cause: The numeric ID is wrong — missing -100 prefix or has extra digits. Fix: Re-copy the ID directly from the Telegram Web URL bar.

Join request actions don't work ​

Cause: The group/channel does not have "Approve new members" mode enabled, so there are no pending requests to approve or decline. Fix: In the group/channel settings, enable Approve new members (sometimes called "join by request").

Bot was added as admin but actions still fail ​

Cause: The bot may have been added without the required specific permissions. Fix: Go back to the Administrators list, select your bot, and verify that the correct permissions are checked for your use case (see the permissions table above).

FAQ ​

  • Q: Do I need to add the bot to the group before it can perform admin actions? A: Yes. The bot must first be added to the group or channel, and then promoted to administrator with the appropriate permissions.

  • Q: Can I use the same bot for multiple groups? A: Yes. Add the bot as an admin to each group separately, then use each group's unique Chat ID in your scenarios.

  • Q: What happens if the user is already banned and I run the Ban action again? A: Nothing breaks — Telegram treats it as a no-op. The action succeeds silently.

  • Q: What happens if there's no pending join request when I run Approve/Decline? A: The action fails silently and the error is logged. Your scenario continues normally — it will not crash.

  • Q: Can I use a numeric ID for a public group? A: Yes, both @username and the numeric ID work for public groups/channels.

  • Actions Node — How to configure Telegram Admin Actions in your scenario.
  • Condition Node — Check if a user is a member of a group or channel.

TeleGo.io Docs