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.