I want to get the list of telegram groups(name) which I am a part of. Like a text file or something else. How can I do that?
Question posted in Telegram API
A comprehensive official documentation can be found here.
A comprehensive official documentation can be found here.
2
Answers
I had the same question here, so I started searching and found no proper answer. Then I came over this question and since it had no answers, it triggered me to search more and write an answer.
According to what Telegram document says here and here:
apparently getAllChats gives you all ChatIds. You can pass chatIds to another API to get chat name and more info.
Also, if you want to get the list of chats you administrate, use the following API:
I just don’t like (or maybe understand) the way they documented their APIs. I wish it was something more familiar, more HTTP-like.
Another way – use web-version of the telegram and parse HTML. Here are steps:
copy($$(".dialog-title .peer-title").map(function(e){return e.textContent}))
in console, it will copy title of groups on screen into clipboard;