telegram api method · layer 229 · #aed6e4f5

payments.upgradeStarGift

usable by users

Upgrade a gift to a collectible gift: can only be used if the upgrade was already paid by the gift sender; see here » for more info on the full flow (including the different flow to use in case the upgrade was not paid by the gift sender).

definition

payments.upgradeStarGift#aed6e4f5 flags:# keep_original_details:flags.0?true stargift:InputSavedStarGift = Updates;

parameters

nametypedescription
flags#Flags, see TL conditional fields
keep_original_detailsflags.0?trueSet this flag to keep the original gift text, sender and receiver in the upgraded gift as a starGiftAttributeOriginalDetails attribute.
stargiftInputSavedStarGiftThe gift to upgrade

returns

Updates

errors (9)

codeerrordescription
400BUSINESS_CONNECTION_INVALIDThe connection_id passed to the wrapping invokeWithBusinessConnection call is invalid.
400BUSINESS_CONNECTION_NOT_ALLOWEDThis 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.
400MESSAGE_ID_INVALIDThe provided message id is invalid.
400PAYMENT_REQUIREDPayment is required for this action, see here » for more info.
400SAVED_ID_EMPTYThe passed inputSavedStarGiftChat.saved_id is empty.
400STARGIFT_ALREADY_CONVERTEDThe specified star gift was already converted to Stars.
400STARGIFT_ALREADY_UPGRADEDThe specified gift was already upgraded to a collectible gift.
400STARGIFT_UPGRADE_UNAVAILABLEA received gift can only be upgraded to a collectible gift if the messageActionStarGift/savedStarGift.can_upgrade flag is set.
401AUTH_KEY_UNREGISTEREDThe specified authorization key is not registered in the system (for example, a PFS temporary key has expired).

history

present in layers 196–229 · constructor id changed 1×

idlayers
#cf4f0781196–197
#aed6e4f5198–229