Fetch the full list of gifts » owned, received or hosted » 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_color_available | flags.9?true | If set, only returns collectible gifts whose palette can be used as a collectible message palette ». |
| exclude_hosted | flags.10?true | If set, excludes hosted collectible gifts », returning only gifts owned or received by peer. |
| peer | InputPeer | Fetch only gifts owned, received or hosted » 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 | COLLECTION_ID_INVALID | The specified collection ID is invalid. |
| 400 | MSG_ID_INVALID | Invalid message ID provided. |
| 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.
Telegram users and channels can change the accent color and background pattern of their profile page and their messages!
Defines a user for further interaction.
Defines a channel for further interaction.
Users can connect Telegram bots that will process and answer messages on their behalf. This allows them 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.