1

I dont know why this is so hard?

What is the way to get GROUP ID (to get channel ID i use Plus+ messenger, but it doesnt show the GROUP ID), where I am a regular member (not an admin),so i cant add bots there.

p.s. If i forward message to external bots, they cant see the Group ID, instead they return the CHAT_ID (that ID is of a chat between me and that bot, thus useless for me).

T.Todua
  • 53,146
  • 19
  • 236
  • 237

2 Answers2

1

There are two ways to do this:

1) If you are a member of a group, you should receive updates from that group when ever there is any activity from that group. The updates will contain a chats list-element from which you can get a Channel which has the following relevant fields:

id: group_id, 
title: "the_group_title", 
username: "group_username"
Charles Okwuagwu
  • 10,538
  • 16
  • 87
  • 157
  • how can i get updates for my user? As i know, I have to request updates for bots, like `api.telegram.org/botXXXXXXXXXXXXXXXX/getUpdates`, but how can i get updates for my regular user? can you give me more example? – T.Todua Aug 08 '17 at 15:22
  • not for bots, i'm referring to the a simple client written with the Telegram API – Charles Okwuagwu Aug 08 '17 at 15:33
  • @T.Todua for examples of how to get started on writing your own simple client, take a look at this SO post https://stackoverflow.com/a/32809138/44080 – Charles Okwuagwu Aug 08 '17 at 17:47
  • Charles, thans for you help, but the last thing is missing to me... you have given Github link, where are tens of other libraries/projects.. can you give me just any (already ready) project/software, which i can use to get `updates` for my user? if you can give me that, I'll check your answer as "chosen". – T.Todua Aug 09 '17 at 11:49
  • @T.Todua my thinking was that you wanted to build your own simple client for this. which language are you comfortable with? – Charles Okwuagwu Aug 09 '17 at 11:52
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/151491/discussion-between-charles-okwuagwu-and-t-todua). – Charles Okwuagwu Aug 09 '17 at 12:04
  • You helped me to find the id. however, i did that using CuteGram app... – T.Todua Aug 09 '17 at 12:11
0

the simplest way i found is

  • open web-telegram in a browser
  • right click on the group name on the left menu
  • click 'inspect' button
  • you will see the group id in the attribute data-peer-id="-xxxxxxxxxx" or peer="-xxxxxxxxxx"
zakaria35
  • 857
  • 1
  • 7
  • 12