Telegram-Mini-Apps / telegram-apps

Made from scratch TypeScript packages, examples and documentation you will surely need to start developing on Telegram Mini Apps.
https://docs.telegram-mini-apps.com/
MIT License
693 stars 192 forks source link

[Bug]: query_id undefined #475

Closed Shestoy06 closed 1 month ago

Shestoy06 commented 1 month ago

Telegram Application

Telegram Web A

Describe the Bug

Opening web app from menu button correctly pass query_id in initData, but opening with mini app link doesn't set query_id. I'm trying to validate data with import { validate } from '@telegram-apps/init-data-node';, so i need to have query_id.

Opening with mini app link

Screenshot 2024-09-29 at 07 12 30

Opening from menu button

Screenshot 2024-09-29 at 07 13 16

To Reproduce

Steps to reproduce the behavior:

  1. Create mini app with /newapp
  2. Open and check initData

Expected Behavior

For use validate function it's needed to have query_id while opening mini app from link.

heyqbnk commented 1 month ago

query_id is optional parameter in init data, it can be missing. Please, follow this documentation to avoid possible problems.