Layer 220
method Users Business
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:InputPeer collection_id:flags.6?int offset:string limit:int = payments.SavedStarGifts;

Parameters

Name Type Description
Flags # Flags, see TL conditional fields
ExcludeUnsaved flags.0?true Exclude gifts not pinned on the profile.
ExcludeSaved flags.1?true Exclude gifts pinned on the profile.
ExcludeUnlimited flags.2?true Exclude gifts that do not have the star Gift. limited flag set.
ExcludeUnique flags.4?true Exclude collectible gifts.
SortByValue flags.5?true If set, sorts the gifts by price instead of reception date.
ExcludeUpgradable flags.7?true Exclude gifts that can be upgraded to collectible gifts.
ExcludeUnupgradable 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= input Peer User; a channel, with peer= input Peer Channel; a connected business user (when executing the method as a bot, over the business connection), with peer= input Peer User.
CollectionId 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

Possible Errors

Code Type Description
400 BUSINESS_CONNECTION_INVALID The connection_id passed to the wrapping invoke With Business Connection call is invalid.
400 PEER_ID_INVALID The provided peer id is invalid.

Gogram Example

// PaymentsGetSavedStarGifts - using Params struct
result, err := client.PaymentsGetSavedStarGifts(&tg.PaymentsGetSavedStarGiftsParams{
    Peer: &tg.InputPeerUser{UserID: int64(123456789)},
    Offset: "...",
    Limit: 0,

    // Optional fields:
    // ExcludeUnsaved: true,
    // ExcludeSaved: true,
    // ExcludeUnlimited: true,
    // ExcludeUnique: true,
    // ...
})
if err != nil {
    // handle error
}
// result is *tg.PaymentsSavedStarGifts