Layer 220
PaymentsTransferStarGift
Transfer a collectible gift to another user or channel: can only be used if transfer is free (i. e. message Action Star Gift Unique. 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).
method
Users
Business
Parameters
| Name | Type | Description |
|---|---|---|
| Stargift | InputSavedStarGift | The gift to transfer. |
| ToId | InputPeer | Destination peer. |
Returns
UpdatesPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | BUSINESS_CONNECTION_INVALID | The connection_id passed to the wrapping invoke With Business Connection call is invalid. |
| 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 input Saved Star Gift Chat. saved_id is empty. |
| 400 | STARGIFT_NOT_FOUND | The specified gift was not found. |
| 400 | STARGIFT_OWNER_INVALID | You cannot transfer or sell a gift owned by another user. |
| 400 | STARGIFT_PEER_INVALID | The specified input Saved Star Gift Chat. peer is invalid. |
Gogram Example
// PaymentsTransferStarGift - positional arguments result, err := client.PaymentsTransferStarGift(&tg.InputSavedStarGift{}, &tg.InputPeerUser{UserID: int64(123456789)}) if err != nil { // handle error } // result is *tg.Updates