When working with Telegram Mini Apps, extracting data from deep links depends on how you've set up your Mini App and which deep link format you're using. Here's a comprehensive guide:
There are two main approaches to Telegram Mini Apps, each with different deep link formats:
/newapp in BotFather)Deep Link Format:
https://t.me/your_bot/app_short_name?startapp=your_parameter
Advantage: Parameters pass directly to your Mini App without needing bot backend code.
/newapp)Deep Link Format:
https://t.me/your_bot?start=your_parameter
Disadvantage: Opens bot chat first; requires bot backend to handle the parameter and pass it to your Mini App.