I'd like to set up a authentication through telegram using it's deep linking api.
In order to authenticate, in my app I ask users to click on a link like:
https://telegram.me/myloginbot?start=somesecretkey
If I understand the docs correctly, I should expect the bot to echo back somesecretky
to my server.
Now, this step of the docs is unclear to me:
- Configure the webhook processor to query Memcached with the parameter that is passed in incoming messages beginning with /start
If I understand correctly, I need to configure myloginbot
so that when the user clicks start button on the bot's page, the bot echos back to my server a url containing somesecretkey
and some user info. But I don't know how to do so.
In this answer, it is suggested that:
- Let the bot retrieve the username by querying the database or key-value storage for unique_code.
But I don't know how can I make the bot query the (presumably remote) database.
So really appreciate your hints.