Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get TELEGRAM Channel/Group ID

Tags:

telegram

Let's say, I've joined TELEGRAM group...

I am just a typical member of GROUP (and thus, cant use any bots there.. ?) so, I am unable to find out the way, how to get GROUP ID.

like image 606
T.Todua Avatar asked Jul 31 '17 10:07

T.Todua


2 Answers

New Update
Just Simply Forward a message from your channel to This Bot: (https://telegram.me/getidsbot)

Update
1: Goto (https://web.telegram.org)
2: Goto your Gorup and Find your link of Gorup(https://web.telegram.org/#/im?p=g154513121)
3: Copy That number after g and put a (-) Before That -154513121
4: Send Your Message to Gorup bot.sendMessage(-154513121, "Hi")
I Tested Now and Work like a Charm

Node.js:
Try using TelegramBot#getChat():

bot.getChat("@channelusername").then(function(chat) {
    // 'chat' is a Chat object
    console.log(chat.id);
});

See API getChat() method and Chat object.

Hope that helps.

like image 131
Saeed Heidarizarei Avatar answered Nov 14 '22 20:11

Saeed Heidarizarei


There is a unofficicl Plus Messenger client for Android users, and you can see ID in group/channel info.

Supergroup and Channel will looks like 1068773197, which is -1001068773197 for bots (with -100 prefix).

If you just want to obtain channel/user ID, forward message to @RawDataBot.

like image 12
Sean Avatar answered Nov 14 '22 22:11

Sean