At first i should emphasis that this is a question about telegram GROUP NOT CHANNEL.I need to get group id to send message via telgram api.
I have review this link .
using @rawDataBot needs to add bot to group, that is not possible most of the times. CuteGram does not login (does not send login code) .so i can say none of the proposed method works.
so is there a new method -except adding a bot to the group- to get telgram group ID ?
if the answer is no, i need to know if it is possible to send message to group by using group name?!
4
Answers
You can get chat id throw object "chat"
You can set middleware which handle new update
Example on Node.JS: bot.on(‘text’, ctx => console.log(‘Chat id is:’, ctx.chat.id))
P.S. group id and chat id are same
if using a bot is acceptable, you can use @username_to_id_bot – no need to add it to a group, just send username or invite link and get the id
the simplest way i found is
the easiest way is to add @chatBotRaw the bot will dump raw data, and you can copy their chat_id or anything else you need,
Remember to remove the bot afterwards because it dumps raw data of every message sent/received in the group.