Fetch the full list of gifts owned by a peer.
Note that unlike what the name suggests, the method can be used to fetch both "saved" and "unsaved" gifts (aka gifts both pinned and not pinned) to the profile, depending on the passed flags.
payments.savedStarGifts#95f389b1 flags:# count:int chat_notifications_enabled:flags.1?Bool gifts:Vector<SavedStarGift> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = payments.SavedStarGifts;
---functions---
payments.getSavedStarGifts#23830de9 flags:# exclude_unsaved:flags.0?true exclude_saved:flags.1?true exclude_unlimited:flags.2?true exclude_limited:flags.3?true exclude_unique:flags.4?true sort_by_value:flags.5?true peer:InputPeer offset:string limit:int = payments.SavedStarGifts;
Name | Type | Description |
---|---|---|
flags | # | Flags, see TL conditional fields |
exclude_unsaved | flags.0?true | Exclude gifts not pinned on the profile. |
exclude_saved | flags.1?true | Exclude gifts pinned on the profile. |
exclude_unlimited | flags.2?true | Exclude gifts that do not have the starGift.limited flag set. |
exclude_limited | flags.3?true | Exclude gifts that do have the starGift.limited flag set. |
exclude_unique | flags.4?true | Exclude collectible gifts ». |
sort_by_value | flags.5?true | If set, sorts the gifts by price instead of reception date. |
peer | InputPeer | Fetch only gifts owned by the specified peer, such as: a user, with peer=inputPeerUser; a channel, with peer=inputPeerChannel; a connected business user (when executing the method as a bot, over the business connection), with peer=inputPeerUser. |
offset | string | Offset for pagination. |
limit | int | Maximum number of results to return, see pagination |
Code | Type | Description |
---|---|---|
400 | BUSINESS_CONNECTION_INVALID | The connection_id passed to the wrapping invokeWithBusinessConnection call is invalid. |
400 | PEER_ID_INVALID | The provided peer id is invalid. |
Represents a star gift, see here » for more info.
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.
Defines a user for further interaction.
Defines a channel for further interaction.
Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.
How to fetch results from large lists of objects.