telegram api method · layer 229 · #7f18176a
payments.transferStarGift
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
| name | type | description |
|---|---|---|
stargift | InputSavedStarGift | The gift to transfer. |
to_id | InputPeer | Destination peer. |
returns
errors (13)
| 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 | MESSAGE_ID_INVALID | The provided message id is invalid. |
| 400 | PAYMENT_REQUIRED | Payment is required for this action, see here » for more info. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 400 | SAVED_ID_EMPTY | The passed inputSavedStarGiftChat.saved_id is empty. |
| 400 | STARGIFT_NOT_FOUND | The specified gift was not found. |
| 400 | STARGIFT_NOT_OWNER | You're not the owner of the gift you trying to transfer. |
| 400 | STARGIFT_NOT_UNIQUE | You can't transfer a non-collectible gift. |
| 400 | STARGIFT_OWNER_INVALID | You cannot transfer or sell a gift owned by another user. |
| 400 | STARGIFT_PEER_INVALID | The specified inputSavedStarGiftChat.peer is invalid. |
| 400 | STARGIFT_TRANSFER_TOO_EARLY_%d | You cannot transfer this gift yet, wait %d seconds. |
| 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 196–229 · constructor id changed 1×
| id | layers |
|---|---|
| #333fb526 | 196–197 |
| #7f18176a | 198–229 |