telegram api method · layer 229 · #a319e569
payments.getSavedStarGifts
Fetch the full list of gifts owned by a peer.
definition
payments.getSavedStarGifts#a319e569 flags:# exclude_unsaved:flags.0?true exclude_saved:flags.1?true exclude_unlimited:flags.2?true exclude_unique:flags.4?true sort_by_value:flags.5?true exclude_upgradable:flags.7?true exclude_unupgradable:flags.8?true peer_color_available:flags.9?true exclude_hosted:flags.10?true peer:InputPeer collection_id:flags.6?int offset:string limit:int = payments.SavedStarGifts;
parameters
| name | type | description |
|---|---|---|
flags | # | Flags, see TL conditional fields |
exclude_unsaved | true | Exclude gifts not pinned on the profile. |
exclude_saved | true | Exclude gifts pinned on the profile. |
exclude_unlimited | true | Exclude gifts that do not have the starGift.limited flag set. |
exclude_unique | true | Exclude collectible gifts ». |
sort_by_value | true | If set, sorts the gifts by price instead of reception date. |
exclude_upgradable | true | Exclude gifts that can be upgraded to collectible gifts ». |
exclude_unupgradable | true | Exclude gifts that cannot be upgraded to collectible gifts ». |
peer_color_available | true | |
exclude_hosted | true | |
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 | int | Only returns gifts within the specified collection ». |
offset | string | Offset for pagination. |
limit | int | Maximum number of results to return, see pagination |
returns
errors (6)
| code | error | description |
|---|---|---|
| 400 | BUSINESS_CONNECTION_INVALID | The connection_id passed to the wrapping invokeWithBusinessConnection call is invalid. |
| 400 | BUSINESS_CONNECTION_NOT_ALLOWED | This method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection. |
| 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. |
| 401 | AUTH_KEY_UNREGISTERED | The specified authorization key is not registered in the system (for example, a PFS temporary key has expired). |
history
present in layers 198–229 · constructor id changed 1×
| id | layers |
|---|---|
| #23830de9 | 198–209 |
| #a319e569 | 210–229 |