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.
Method schema is available as of layer 210. Switch »
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_unique | flags.4?true | Exclude collectible gifts ». |
sort_by_value | flags.5?true | If set, sorts the gifts by price instead of reception date. |
exclude_upgradable | flags.7?true | Exclude gifts that can be upgraded to collectible gifts ». |
exclude_unupgradable | flags.8?true | Exclude gifts that cannot be upgraded to collectible gifts ». |
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. |
collection_id | flags.6?int | Only returns gifts within the specified collection ». |
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.
Business users can connect Telegram bots that will process and answer messages on their behalf. This allows businesses to seamlessly integrate any existing tools and workflows, or add AI assistants that manage their chats.
How to fetch results from large lists of objects.
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.