How to Safely Use Telegram Mini App QR Scanner

Telegram Mini App: Learn why Telegram Mini App QR scanners return untrusted text and how to verify codes before taking action. Follow these checks

The ability to scan QR codes is a highly convenient feature within many messaging ecosystems, and Telegram Mini Apps are no exception. However, the utility of this feature comes with specific responsibilities and risks that users and developers must understand to ensure security when interacting with QR codes. This guide explains how Telegram Mini App QR scanning works, highlights the essential risks, and offers grounded safety practices that can help prevent costly mistakes.

How Telegram Mini App QR Scanning Works

A Telegram Mini App can leverage QR code scanning through the showScanQrPopup method, which is documented in the official Telegram web apps documentation. When a Mini App asks a user to scan a QR code, Telegram presents the scanning interface. Once the code is scanned, its raw contents are returned to the Mini App using an event called qrTextReceived.

It’s crucial to understand that the Telegram Mini App QR Scanner acts solely as a transport mechanism for the QR code's plain text. Whether the code contains a URL, wallet address, payment instruction, or another type of data, the scanner delivers the decoded text to the Mini App. The event is not an authenticity or transaction-safety check.

  • Further handling depends on the Mini App. The scanner delivers text to the application's event handler; the app may use that data to display information or start another action. Do not assume a separate review screen always appears.
  • The documented qrTextReceived event reports scanned text; it is not a guarantee that a URL, address, payment request or project is authentic. The Mini App must perform its own appropriate validation.

This design ensures flexibility for developers but puts the onus of safety and further action squarely on the user. After scanning, what happens next depends on the Mini App's implementation. You may not get an opportunity to inspect a link before the app takes another step, so verify QR codes and the app's identity before scanning.

Practical Risks with Scanned QR Codes

Deceptive or Malicious Content

A QR code can encode any string, including fraudulent links, misleading wallet addresses, or fake payment requests. Because Telegram’s scanner simply presents the raw data, a malicious QR code can attempt to trick users into connecting to unsafe sites, sending funds to the wrong wallet, or approving harmful actions.

Phishing and Impersonation

Attackers can place QR codes on counterfeit support pages, copied campaign materials or messages that imitate a legitimate wallet provider. A scanner event cannot distinguish a familiar-looking but malicious domain from an authentic one. Compare the destination with a link obtained independently from a verified project website or official channel before entering credentials, signing messages or connecting a wallet.

Developer Responsibilities

Developers should treat qrTextReceived data as untrusted input. Validate supported formats, permit only the expected URL schemes and domains, and reject malformed or unexpected payloads. Show clear destination and amount details before a payment or wallet action, rather than assuming the scan itself proves user intent. Telegram also exposes a scanQrPopupClosed event when the user closes the scanner. A wallet-related authorization must still follow the wallet's separate signing and confirmation flow.

Safety Practices When Using QR Scanners

  • Double-check all details: Carefully review any URL, domain, or wallet address that appears after scanning. For example, subtle typographical differences in URLs may point to phishing attempts.
  • Avoid acting on scans alone: Never approve transactions, connect wallets, or perform sensitive actions purely based on the content of a scanned QR code.
  • Treat all scan outputs as untrusted: Until you have reviewed and confirmed the contents with a known, reliable reference, regard everything returned by the scanner as potentially risky.
  • Report the suspicious: If you encounter a QR code that triggers dubious prompts or points to unknown destinations, report it or ignore it instead of continuing.
  • Check for explicit verification: Some Mini Apps may offer context-specific verification steps (such as additional confirmation dialogs or details screens) before you act. Always take time to use them where available.

Remember, a successful scan is not a validation of the decoded data. The Mini App developer must validate and safely handle the payload, while users should verify payment and wallet requests independently before authorizing them.

TON Drop Hub take: Exercising careful manual verification is the best way to safeguard your funds and data. QR code convenience must always be balanced with skepticism towards untrusted sources and explicit confirmation of all scanned details.

For more detailed walkthroughs and best practices for onboarding, wallet safety, and Mini App interactions, see our TON guides.

Further Reading

For Telegram's official documentation concerning Mini App web apps—including the QR scanner—visit their developer site.