How to Share Media and Files Directly from Telegram Mini Apps: Referral Cards, Custom Memes & In-Chat Distribution
Unlock seamless viral distribution inside Telegram. Learn how Mini Apps generate personalized referral cards, in-game victory memes, and downloadable files that users can send directly into any private chat, group, or channel with a single tap.
Send rich media, referral codes, and customized graphics directly to contacts or group chats without leaving the app.
Generate personalized viral cards embedding the user's username, rank, and deep-link QR codes automatically.
Invite entire gaming squads or office channels with interactive launch buttons that open the shared session instantly.
hub Overview: Eliminating the Friction of Viral Growth
developer_mode Developer SDK: shareToChat & switchInlineQuery
// Share a prepared referral card or meme to any Telegram chat
window.Telegram.WebApp.shareToChat({
text: "Check out my new high score in Arena! Play with me: https://t.me/ArenaBot/game?startapp=ref123",
media_url: "https://api.mygame.com/cards/score_user9481.png"
});
// Alternatively, trigger native inline query selector
window.Telegram.WebApp.switchInlineQuery("invite_squad_alpha", ['users', 'groups']);
Preview how an in-game achievement or referral card renders inside a Telegram chat thread when shared by a user.
help Frequently Asked Questions
Never. Telegram enforces strict user authorization. Mini Apps cannot send silent messages on your behalf; they can only open the native chat selector where you explicitly select the recipient and review the message before pressing send.
No. Telegram Mini Apps execute instantly in the cloud. Tapping the link immediately opens the shared game or application session right within Telegram on any platform.