Telegram Bot API

Upgrades a given regular gift to a unique gift. Requires the can_transfer_and_upgrade_gifts business bot right. Additionally requires the can_transfer_stars business bot right if the upgrade is paid. Returns True on success.

post/upgradeGift

Request

  • Base URL: https://api.telegram.org/bot<bot_token>
  • URL: https://api.telegram.org/bot<bot_token>/upgradeGift
  • Auth: none declared

Request body

business_connection_idstring required

Unique identifier of the business connection

owned_gift_idstring required

Unique identifier of the regular gift that should be upgraded to a unique one

keep_original_detailsboolean

Pass True to keep the original gift text, sender and receiver in the upgraded gift

star_countinteger

The amount of Telegram Stars that will be paid for the upgrade from the business account balance. If gift.prepaid_upgrade_star_count > 0, then pass 0, otherwise, the can_transfer_stars business bot right is required and gift.upgrade_star_count must be passed.

Response

Telegram API response

oktrue required
resulttrue required

Changes

No recorded changes to this operation across all 3 revisions of this API.