I’m currently developing a bot for telegram using the Python API and I’m trying to use deep linking to have command parameters running when the user presses the Start button.
For example, my link is http://t.me/mybot?start=parameter
How can I process the parameter that was entered ?
Lots of thanks! 🙂
2
Answers
You need to set up a webhook for incoming messages to receive such updates. Telegram notifies you automatically when somebody clicks a link like http://t.me/mybot?start=parameter. This is webhook documentation:
https://core.telegram.org/bots/api#setwebhook
Check Telegram deep linking documentation (https://core.telegram.org/bots#deep-linking) for an example.
Use,
context.update.startPayload
to get the pay load data.