We have a website that also works as a Telegram webapp for our bot. We’re having an issue exchanging the unique user token to bearer token, provided to him/her when the bot runs /start command. Our website uses bearer token for user authentication, and stores it in a cookie for authorization.
The problem is, when I create a link to webapp with a query parameter startapp, the webapp doesn’t receive that parameter, and therefore cannot exchange it for bearer token.
What is the proper way to pass a query parameter to webapp via a link like t.me/MyBot/MyApp?startapp=uniquetoken that’s accessible inside of it?
I tried passing it via start_param, startapp and startattach, all to no avail. According to the docs I’m supposed to pass it via startapp, but it doesn’t seem to work.