Telegram Bot API: obtain all groups my bot is a member of - telegram

I'm looking for a way to see all chats/channels/groups my bot participating in except to use webhook or getUpdates method. These methods are not suitable for me because to use them you need to send a message to chat or do something like that and you have to repeat this procedure for every chat. Is there any way to get a list of all the groups at once not making any changes to them except adding the bot itself?

Unfortunately currently its not possible.

Related

Telegram API: How to make message history for new group users visible

I want to make message history for new group users visible. For now I have managed to find channels.togglePreHistoryHidden method in the API but it takes channel as an argument, not a group. There is no similar method for groups. Moreover, as far as I know there is no such option to hide message history for channels in telegram so i'm a bit confused. Could anyone explain me how should I do this. Code snippet in telethon would be greate.

catching event of deleting a groupe-chat in telegram bot api

I'm rellay happy with that community here. I found many answers in different cases. But this time I don't find one. So maybe someone can help me?
I'm working on a telegram bot using php and webhook updates. I track if my bot is added in a group chat by "new_chat_member" or "group_chat_created" and by "left_chat_member" if it got deleted from that groupe. UNtil then everything works fine.
If I - as admin - and the bot are the last two members and I delete the chat in the telegram app, I just get a "left_chat_member" for me (the last user in the groupe). But what about the bot? Isn't the chat deletet completely? Is the groupe remaining just with the bot as a member? Got someone an idea how to catch that situation? I would need something like "chat_deleted"
Thanks a lot,
Markus
I found a possible solution:
https://core.telegram.org/bots/api#getchatmemberscount
Always on "left_chat_member" event, I check how many members are left. And if there is just two left I delete the chat of my "tracking" list. Still don't know if the bot is registered to that groub-chat on the telegram side, but don't really have another idea.

Can I extract and automatically message users on a TG group?

I’m part of a telegram group. I can see other users on the group, and I can message them individually (and manually). Is it possible to automatically (programmatically) message all the users on the group individually? Note I am not the admin.
If it is indeed possible, is there any sample code you can share?
It would be particularly awesome if the message could be customized for admin and non-admin. This means I’d need to detect if a particular user is an admin.
Thanks
I'm not sure if I get what you are looking for but I assume you have a Telegram Bot and wanna message all users in an specific group/supergroup. First I have to remind you bot can't start private message according to this link
Bots can't initiate conversations with users. A user must either add them to a group or send them a message first.
If I got it wrong feel free leave comment and I will update the answer ASAP ;-) ^_^

how to see if a member has left from a telegram channel?

I want to develope a bot in telegram to set as the admin of my channel.
And I want it to notify me whenever a member leaves the channel. And I want it to tell me who it was. and I prefer to have name or username.
I think you can. If you can see all subscribers in your channel and you can make a program to identify who lives your channel by checking and substracting existing members vs last members & you can set activity starter when member counts change
#fkadeal this is my idea & it's not tested yet
Unfortunately, you can only get member count at this time, even your bot is admin, can't get full list of member, you can just clumsy track users by their ID.

telegram private channel unique invite link

i create a private channel in telegram.
i want to know if there is any way to create an unique invite link that i can share to people i want to join my channel. unique like single use.
actually telegram gives you an invite link but its always the same so if i give it to a person he can give it to anyone he wants. i need a method to avoid this. i'd tried some url shortening services to hide the invite link but at the end they still show the iniztial invite link.
any suggestion?
i'd tried http://once.ly/index.html
Edit:
Now you can generate unique links for different people, and limit how many people can join and change the expiring time!
Original answer (2017):
There is no way to create a unique invite link at this time.
But if I were you, I would create a bot, send link via bot with inline button, which is default hiding link behind text.
For example, you give your user a link like t.me/bot?start=channel_link, and when your bot received /start channel_link, send a message with inline button with url parameter.
Try this one from the documentation.
start=channel_link
Ok, now this is possible using tg bots: the createchatinvitelink endpoint is available and has member_limit param. Set the latter to 1 and the link becomes "unique".

Resources