How to get Channel or Group Information using Telegram API

Easy Steps to get Telegram Group or Channel Information, e.g. description, members count, etc using Telegram API.

Easy Steps to get Telegram Group or Channel Information, e.g. description, members count, etc using Telegram API.

This post is about to be updated.

Hello! Welcome to Fineshop Design.

In this article, we will learn how to get Telegram Group or Channel information (for e.g. description, members count, etc) using Telegram API.

getChat Method - Telegram API
© Fineshop Design | Telegram API

Before we start let's take a look at its Demo.

What is Telegram?

Telegram is a popular cross-platform messaging app developed by Telegram Messenger LLP, a privately held company registered in London, United Kingdom. It is widely used because it offers some enhanced privacy and encryption features as well as supports large group chat features.

The Telegram app is multiplatform, with versions of the app available for iOS, Android, Windows, Mac, and Linux. You can also access the Telegram from a web browser.

Telegram was founded by Russian social media entrepreneur Pavel Durov, and the service is free to use.

How to get Channel or Group Info?

Before we start, there are few requirements to send HTTP Request to Telegram API and get the response.


  1. Create a bot on Telegram app, and get the bot token.
  2. For tracking Channels or Groups, @channel name or @group name is required. However you can also use chat_id, i.e. -1001615491316. chat_id is required in case of private group or channel.
  3. Bot must not be banned in the Group or Channel. Add the bot if the group or channel is private.

To get the information of a Telegram Group or Channel, what we need to do is send a HTTP request to Telegram API.
API Example:<token-here>?<api-method-here>

If you want to lean more about other API methods, you can read Telegram Bot API

getChat Method

Using this method, we can get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.).

It returns a Chat object on success, as shown in example below:

    id: -1001615491316,
    title: "Fineshop Design - Support",
    username: "Fineshop_Design",
    type: "supergroup",
    description: "The official Group of Fineshop Design.\n\nChannel: @fineshopdesign\nWebsite:",
    permissions: {
        can_send_messages: true,
        can_send_media_messages: true,
        can_send_polls: false,
        can_send_other_messages: true,
        can_add_web_page_previews: false,
        can_change_info: false,
        can_invite_users: true,
        can_pin_messages: false
    linked_chat_id: -1001737659421,
    photo: {
        small_file_id: "AQADBQADO7AxG_8oWVQACAIAAwx_EMsW____v1GqOZ_Ct30jBA",
        small_file_unique_id: "AQADO7AxG_8oWVQAAQ",
        big_file_id: "AQADBQADO7AxG_8oWVQACAMAAwx_EMsW____v1GqOZ_Ct30jBA",
        big_file_unique_id: "AQADO7AxG_8oWVQB"

Thus, we got all the needed information about the group or channel.

But the chat object does not contain the total no. of group members or channel subscribers.

getChatMembersCount Method

To track the members count, we need to send a HTTP request again using getChatMembersCount Method.

We shall get a response like:

    ok: true,
    result: 158

The total number of followers is shown in the result key. We just have parse it out.

Full Example

Here is a full example through which you can learn how to get the Group or Channel information using Telegram API.


Here is the HTML Codes:

<!DOCTYPE html>
<html lang='en'>

  <meta charset='UTF-8'>
  <meta http-equiv='X-UA-Compatible' content='IE=Edge'>
  <meta name='viewport' content='width=device-width, initial-scale=1'>

  <title>Telegram Group or Channel Information</title>
  <link rel='stylesheet' href='style.css'>

  <div id='telegram-info'></div>
  <script src='script.js'></script>



Here is the CSS Codes:

@import url(',wght@0,400;0,500;0,700;1,600&display=swap');

body {
  padding: 15px;
  background: #E8EAF6;
  font-family: 'Poppins', sans-serif;

.container {
  background: #fff;
  padding: 5px;
  border-radius: 10px;
  box-shadow: 0 5px 35px rgba(0, 0, 0, .1);
  font-size: 14px;
  font-weight: 400;

.box {
  display: flex;
  flex-wrap: wrap;
  background: #E3F2FD;
  margin: 10px;
  border-radius: 10px;
  overflow: hidden;

.box >* {
  position: relative;
  padding: 15px;
  background: #fff;
  width: 100%;

.box >*:first-child {
  background: #42A5F5;
  color: #fff;
  border-radius: 10px;
  font-weight: 500;

.box >*:last-child {
  background: #E3F2FD;


Here is the Vanilla JavaScript Codes:

 * To Get Group or Channel Info
 * Using Telegram API
 * By Fineshop Design

/* Telegram Bot Api Token (sensitive), don't share publicly */
var token = '****************';

/* chat_id for the group or channel you want to track, i.e. @group, @channel or -1001615491316 */
var chat_id = '@Fineshop_Design';

/* HTTP Request Function */
function httpRequest(URL, Method) {
  var xmlHttp = new XMLHttpRequest();, URL, false);
  xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
  return JSON.parse(xmlHttp.responseText);

/* Sending a request to Telegram API to get chat object of a particular channel or group */
function getChatDetails() {
  return httpRequest(`${token}/getChat?chat_id=${chat_id}`, 'GET');

/* Parsing Chat Object from result key */
var chatObj = getChatDetails()['result'];

/* Sending a request to Telegram API to get number of members in a particular group or channel */
function getMemberCount() {
  return httpRequest(`${token}/getChatMembersCount?chat_id=${chat_id}`, 'GET');

/* Parsing Members Number from result key */
var members = getMemberCount()['result'];

/* Writing in HTML */
document.getElementById('telegram-info').innerHTML = `<div class='container'>
  <div class='box'>
  <div class='box'>
  <div class='box'>
  <div class='box'>
    <span>Chat ID:</span>
  <div class='box'>
    <span>${chatObj.description ? chatObj.description.replaceAll('\n', '<br>') : "No description"}</span>
  <div class='box'>


This is all about getting a Telegram Group or Channel Data using Telegram API. I hope you enjoy this article. Please do share this article. And if you are facing problem in any section or you have any question then ask us in . Thank you!

© Copyright:

About the Author

~ Hello World!


  1. Can You make an article on "HOW TO CUSTOMIZE PLUS UI?"
    1. Sure. Wait for the new version.
      Thank you.
  2. 💖😂😁😎
To avoid SPAM, all comments will be moderated before being displayed.
Don't share any personal or sensitive information.
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.