0

Situation: I am now developing a web site which enables users exchange signals(information) and messages. The registered users can also be involved in the telegram group chat where all registered users can chat. The way the users get into the group is by using an invite link(https://t.me/joinchat/HIxsXlkpAll3GNxj96S...). I developed a telegram bot which is admin in the group. What I want is: I want to match credential of user in the web site with the user_id. When a user gets in to the group, he/she is assigned with a unique user_id. If I know which user in the web site has that user_id, then I can control the user in the group based on the information of that use in the web site. For example, when the user's plan is expired, then I can kick(disable) the user from the group. The Problem is: I can not assign user_id to a specific user in the web site when the are added in the telegram group. Can anybody please help me? Thank you.

What I have tried: I tried to use telegram bot APIs but I found that the api is limited. The bot can not add a new user in the group with php code. I failed to find a way of getting user credential from new_chat_members of a message.

Myong.W
  • 1
  • 2
  • Can we see what you tried and how specifically it went wrong? – showdev Apr 13 '19 at 04:15
  • It looks like bots can [invite users](https://stackoverflow.com/a/42490401/924299), but [not directly add them](https://github.com/go-telegram-bot-api/telegram-bot-api/issues/188) to a group. Also see: [Chat API to add and remove members automatically](https://stackoverflow.com/a/52385143/924299). – showdev Apr 13 '19 at 04:18
  • See [Bots can't add user to group/channel](https://stackoverflow.com/questions/46041889/how-to-promote-users-to-supergroup-using-telegram-bot-apiphp/46044108#46044108). – showdev Apr 13 '19 at 04:43
  • Thank you very much. Then can I get user information(like email) from the user_id? – Myong.W Apr 13 '19 at 06:07

0 Answers0