Telegram Bot API

Gifts a Telegram Premium subscription to the given user. Returns True on success.

post/giftPremiumSubscription

Request

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

Request body

user_idinteger required

Unique identifier of the target user who will receive a Telegram Premium subscription

month_count3 | 6 | 12 required

Number of months the Telegram Premium subscription will be active for the user; must be one of 3, 6, or 12

star_countinteger required

Number of Telegram Stars to pay for the Telegram Premium subscription; must be 1000 for 3 months, 1500 for 6 months, and 2500 for 12 months

textstring

Text that will be shown along with the service message about the subscription; 0-128 characters

text_parse_modestring

Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.

Response

Telegram API response

oktrue required
resulttrue required

Changes

    • info

      added the new optional request property /////// (media type: application/json)

    • info

      added the new optional request property /////// (media type: application/x-www-form-urlencoded)