payments.getStarGiftUpgradePreview #

Obtain a preview of the possible attributes (chosen randomly) a gift » can receive after upgrading it to a collectible gift », see here » for more info.

Layer 223

payments.starGiftUpgradePreview#3de1dfed sample_attributes:Vector<StarGiftAttribute> prices:Vector<StarGiftUpgradePrice> next_prices:Vector<StarGiftUpgradePrice> = payments.StarGiftUpgradePreview;
---functions---
payments.getStarGiftUpgradePreview#9c9abcb1 gift_id:long = payments.StarGiftUpgradePreview;

Parameters #

NameTypeDescription
gift_idlongThe gift to upgrade.

Result #

payments.StarGiftUpgradePreview

Only users can use this method #

Possible errors #

CodeTypeDescription
400STARGIFT_INVALIDThe passed gift is invalid.
400STARGIFT_UPGRADE_UNAVAILABLEA received gift can only be upgraded to a collectible gift if the messageActionStarGift/savedStarGift.can_upgrade flag is set.

Telegram Gifts #

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.

messageActionStarGift #

You received a gift, see here » for more info.

savedStarGift #

Represents a gift owned by a peer.