Home > Enterprise >  How to handle logged in userId from the web app when joining to the telegram group of the site?
How to handle logged in userId from the web app when joining to the telegram group of the site?

Time:09-22

I have a web site that has a telegram button with invitation link to the telegram group. Created a bot using Botfather for listnening new member events.

Is there a way to catch a userId that has joined to the group from website in order to save a username in DB?

CodePudding user response:

There are not any direct methods, but there is an indirect method to solve this problem:

On Your Website
change link to https://t.me/@your_bot_username?start=webname-group_name

In Your Bot
check start command and split its arguments and first argument will website and 2nd will group username and then send him group link, also save userid in your database.

  • Related