telegram api method · layer 229 · #74bf076b
payments.convertStarGift
Convert a received gift » into Telegram Stars: this will permanently destroy the gift, converting it into starGift.convert_stars Telegram Stars, added to the user's balance.
definition
payments.convertStarGift#74bf076b stargift:InputSavedStarGift = Bool;
parameters
| name | type | description |
|---|---|---|
stargift | InputSavedStarGift | The gift to convert. |
returns
errors (7)
| 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 | SAVED_ID_EMPTY | The passed inputSavedStarGiftChat.saved_id is empty. |
| 400 | STARGIFT_PEER_INVALID | The specified inputSavedStarGiftChat.peer is invalid. |
| 400 | USER_ID_INVALID | The provided user ID is invalid. |
| 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 189–229 · constructor id changed 2×
| id | layers |
|---|---|
| #0421e027 | 189–195 |
| #72770c83 | 196–197 |
| #74bf076b | 198–229 |