telegram api method · layer 229 · #7f18176a

payments.transferStarGift

usable by users

Transfer a collectible gift to another user or channel: can only be used if transfer is free (i.e. messageActionStarGiftUnique.transfer_stars is not set); see here » for more info on the full flow (including the different flow to use in case the transfer isn't free).

definition

payments.transferStarGift#7f18176a stargift:InputSavedStarGift to_id:InputPeer = Updates;

parameters

nametypedescription
stargiftInputSavedStarGiftThe gift to transfer.
to_idInputPeerDestination peer.

returns

Updates

errors (13)

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.
400PEER_ID_INVALIDThe provided peer id is invalid.
400SAVED_ID_EMPTYThe passed inputSavedStarGiftChat.saved_id is empty.
400STARGIFT_NOT_FOUNDThe specified gift was not found.
400STARGIFT_NOT_OWNERYou're not the owner of the gift you trying to transfer.
400STARGIFT_NOT_UNIQUEYou can't transfer a non-collectible gift.
400STARGIFT_OWNER_INVALIDYou cannot transfer or sell a gift owned by another user.
400STARGIFT_PEER_INVALIDThe specified inputSavedStarGiftChat.peer is invalid.
400STARGIFT_TRANSFER_TOO_EARLY_%dYou cannot transfer this gift yet, wait %d seconds.
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
#333fb526196–197
#7f18176a198–229