payments.getResaleStarGifts

Get collectible gifts of a specific type currently on resale, see here » for more info.

sort_by_price and sort_by_num are mutually exclusive, if neither are set results are sorted by the unixtime (descending) when their resell price was last changed.

See here » for detailed documentation on this method.

payments.resaleStarGifts#947a12df flags:# count:int gifts:Vector<StarGift> next_offset:flags.0?string attributes:flags.1?Vector<StarGiftAttribute> attributes_hash:flags.1?long chats:Vector<Chat> counters:flags.2?Vector<StarGiftAttributeCounter> users:Vector<User> = payments.ResaleStarGifts;
---functions---
payments.getResaleStarGifts#7a5fa236 flags:# sort_by_price:flags.1?true sort_by_num:flags.2?true for_craft:flags.4?true stars_only:flags.5?true attributes_hash:flags.0?long gift_id:long attributes:flags.3?Vector<StarGiftAttributeId> offset:string limit:int = payments.ResaleStarGifts;

Parameters

Name Type Description
flags # Flags, see TL conditional fields
sort_by_price flags.1?true Sort gifts by price (ascending).
sort_by_num flags.2?true Sort gifts by number (ascending).
for_craft flags.4?true Only return collectible gifts that can be bought and used for crafting »; render each returned gift's starGiftUnique.craft_chance_permille as its crafting success contribution.
stars_only flags.5?true Only return gifts that can be bought using Stars.
attributes_hash flags.0?long If a previous call to the method was made and payments.resaleStarGifts.attributes_hash was set, pass it here to avoid returning any results if they haven't changed.
Otherwise, set this flag and pass 0 to return payments.resaleStarGifts.attributes_hash and payments.resaleStarGifts.attributes, these two fields will not be set if this flag is not set.
gift_id long Mandatory identifier of the base gift from which the collectible gift was upgraded.
attributes flags.3?Vector<StarGiftAttributeId> Optionally filter gifts with the specified attributes. If no attributes of a specific type are specified, all attributes of that type are allowed.
offset string Offset for pagination. If not equal to an empty string, payments.resaleStarGifts.counters will not be set to avoid returning the counters every time a new page is fetched.
limit int Maximum number of results to return, see pagination

Result

payments.ResaleStarGifts

Only users can use this method

Possible errors

Code Type Description
400 STARGIFT_ATTRIBUTE_INVALID  
400 STARGIFT_INVALID The passed gift is invalid.

Related pages

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.

starGiftUnique

Represents a collectible star gift, see here » for more info.

The sticker that represents the gift is contained in a starGiftAttributeModel object in attributes.

Telegram Stars

Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.

payments.resaleStarGifts

List of gifts currently on resale ».

Pagination in the API

How to fetch results from large lists of objects.