I use the Telegram API to develop a program for combining Telegram groups or channels by their links.
Methods that connect a group or channel (e.g. channel.joinChannel) need chat_id
or channel_id
, but I only have links to groups or channels (e.g. @channel_username or https://t.me/channel_username or https: // t. me / joinChat / xxxxx )
How can I get chat_id
either a channel_id
group or a channel having a link?
PS: I am not the administrator of these groups or channels.
source
share