I am using Telegram API to develop a program to join Telegram groups or channel by their links.
Methods that join group or channel (e.g. channels.joinChannel) need chat_id
or channel_id
, but I have only the links of the groups or channels (e.g. @channel_username or https://t.me/channel_username or https://t.me/joinChat/xxxxx)
How can I obtain chat_id
or channel_id
of a group or channel having its link?
P.S: I'm not the admin of these groups or channels.