Contains info about collectible gift » for a webPage preview of a collectible gift » (the webPage will have a type of telegram_nft).
webPageAttributeUniqueStarGift#cf6f6db8 gift:StarGift = WebPageAttribute;
| Name | Type | Description |
|---|---|---|
| gift | StarGift | The starGiftUnique constructor. |
Represents a collectible star gift, see here » for more info.
The sticker that represents the gift is contained in a starGiftAttributeModel object in attributes.
Users can send Gifts to their friends. The recipients of gifts can display them on their profile pages or turn them into Telegram Stars ». Telegram Stars can be used for many things, including supporting creators and buying services in mini apps.
Webpage preview
The type field indicates the type of the web page, which influences how the preview is rendered (i.e. which extra action button is offered, where the media is taken from, and which WebPageAttribute is present in the attributes field). It can be one of the following:
app - Preview of a Mini App link »: the photo is the app icon, and clients render a button that launches the Mini App ».article - Preview of a generic external article or webpage. If cached_page is set, clients render an instant view button.document - Preview of an external document or file, contained in the document field.gif - Preview of an external animated GIF. If embed_url+embed_type are set the GIF is rendered using an embedded player, otherwise the animation is contained in the document field.photo - Preview of an external photo, contained in the photo field.profile - Preview of an external author or profile page; clients typically render this with a small thumbnail (forced small media).telegram_aicomposetone - Preview of an AI compose tone link », shared when previewing a custom AI composer tone ». The attributes field contains a webPageAttributeAiComposeTone with the custom emoji » representing the tone; clients render a button that applies the shared tone.telegram_album - Preview of a message link » pointing to a group of messages (album), rendered as a grouped media album rather than as a single-media preview. For this type the album media is not taken from the top-level photo/document fields: instead, a cached_page (instant view) must be present, and clients render the items of its first pageBlockCollage or pageBlockSlideshow block. Each pageBlockPhoto/pageBlockVideo item in that block references a photo or video by ID, resolved against the photos and documents of the cached_page. The instant view itself is not offered as a button (the album media replaces it).telegram_auction - Preview of an auction link » to a collectible gift auction ». The attributes field contains a webPageAttributeStarGiftAuction with the auctioned gift and the auction end date; clients render a button to join the auction, or to view the results once the auction has ended.telegram_background - Preview of a wallpaper deep link » to a chat wallpaper ». The wallpaper settings (background colors, gradient rotation, pattern intensity, blur/motion, etc.) are parsed from the deep link in the url, not from dedicated fields. Image wallpapers carry the wallpaper image in the document field. Pattern wallpapers also use the document field, with application/x-tgwallpattern or image/png as the pattern MIME type; the colors from the url are rendered as the pattern background and tint. Solid-color and gradient wallpapers carry no media and are rendered from the colors encoded in the url. No photo is present. Clients render a button to apply the background.telegram_bot - Preview of a bot link », rendered like a profile preview using the bot's avatar in the photo field.telegram_botapp - Preview of a direct Mini App link » to a named bot Mini App: the photo is the app preview, and clients render a button that opens the Mini App.telegram_call - Preview of a conference link » to a group call/conference call »; clients render a button to join the call (no photo/document is present).telegram_channel - Preview of a public username link » to a channel, using the channel's avatar in the photo field; clients render a button to open/join the channel.telegram_channel_boost - Preview of a boost link » to boost a channel », using the channel avatar in the photo field; clients render a button to boost the channel.telegram_channel_direct - Preview of a monoforum link » to the direct messages of a channel, using the channel avatar in the photo field.telegram_channel_request - Preview of a chat invite link » to a channel that has join requests » enabled; clients render a "Request to join" button.telegram_chat - Preview of a public username link » to a basic group, using the group avatar in the photo field; clients render a button to open/join the group.telegram_chat_request - Preview of a chat invite link » to a group that has join requests » enabled; clients render a "Request to join" button.telegram_chatlist - Preview of a chat folder link » to a shareable chat folder » (no photo/document is present): clients use the site_name, title and description fields for the preview text, no WebPageAttribute is required, and the action button opens the deep link in url to import the folder.telegram_collection - Preview of a gift collection link » to a gift collection ». The attributes field contains a webPageAttributeStarGiftCollection with the collection's icon stickers; clients render a button to view the collection.telegram_community - Preview of a chat folder link » to a shareable chat folder », rendered like telegram_chatlist.telegram_giftcode - Preview of a premium giftcode link » to a Telegram Premium gift code »; clients render a button to view/redeem the gift code (no photo/document is present).telegram_group_boost - Preview of a boost link » to boost a supergroup », using the supergroup avatar in the photo field; clients render a button to boost the supergroup.telegram_livestream - Preview of a video chat/livestream link » to a live video stream », rendered as a video chat preview marked as a livestream; clients render a button to watch the stream.telegram_megagroup - Preview of a public username link » to a supergroup, using the supergroup avatar in the photo field; clients render a button to open/join the supergroup.telegram_megagroup_request - Preview of a chat invite link » to a supergroup that has join requests » enabled; clients render a "Request to join" button.telegram_message - Preview of a message link » to a single message; clients render a button to open the message. Any cached_page instant view is ignored for this type.telegram_newbot - Preview of a managed bot creation request link » used to create a new bot; clients render a button to create/register the managed bot.telegram_nft - Preview of a collectible gift link » to a collectible (unique) gift ». The attributes field contains a webPageAttributeUniqueStarGift with the unique gift; clients render a button to view the collectible.telegram_stickerset - Preview of a stickerset link » to a sticker or custom emoji set ». The attributes field contains a webPageAttributeStickerSet with a few preview stickers and the emojis/text_color flags; clients display the preview stickers and render a button to view the sticker set (or custom emoji set, if the emojis flag is set).telegram_story - Preview of a story link » to a story ». The attributes field contains a webPageAttributeStory with the story's peer and ID (and optionally the embedded storyItem); the preview media and caption are taken from the story, and clients render a button to view it.telegram_story_album - Preview of a story album link » to a story album »: a photo (and optional video document) cover is present, and clients render a button to view the story album.telegram_theme - Preview of a theme link » to a theme ». The attributes field contains a webPageAttributeTheme with the theme file(s) and theme settings; clients render a button to apply the theme.telegram_user - Preview of a public username link » to a user, rendered like a profile preview using the user's avatar in the photo field.telegram_videochat - Preview of a video chat/livestream link » to a video chat », rendered as a video chat preview.telegram_voicechat - Preview of a video chat/livestream link » to a voice chat », rendered as a (non-video) video chat preview; clients render a button to join the voice chat.video - Preview of an external video. If embed_url+embed_type are set the video is rendered using an embedded player, otherwise the video is contained in the document field.