messageActionGiftCode #

Contains a Telegram Premium giftcode link.

Layer 223

messageActionGiftCode#31c48347 flags:# via_giveaway:flags.0?true unclaimed:flags.5?true boost_peer:flags.1?Peer days:int slug:string currency:flags.2?string amount:flags.2?long crypto_currency:flags.3?string crypto_amount:flags.3?long message:flags.4?TextWithEntities = MessageAction;

Parameters #

NameTypeDescription
flags#Flags, see TL conditional fields
via_giveawayflags.0?trueIf set, this gift code was received from a giveaway » started by a channel/supergroup we're subscribed to.
unclaimedflags.5?trueIf set, the link was not redeemed yet.
boost_peerflags.1?PeerIdentifier of the channel/supergroup that created the gift code either directly or through a giveaway: if we import this giftcode link, we will also automatically boost this channel/supergroup.
daysintDuration of the gifted Telegram Premium subscription, in days.
slugstringSlug of the Telegram Premium giftcode link
currencyflags.2?stringThree-letter ISO 4217 currency code
amountflags.2?longTotal price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
crypto_currencyflags.3?stringIf set, the gift was made using the specified cryptocurrency.
crypto_amountflags.3?longIf crypto_currency is set, contains the paid amount, in the smallest units of the cryptocurrency.
messageflags.4?TextWithEntitiesMessage attached with the gift

Type #

MessageAction

Giveaways and gifts #

Telegram channel and supergroup administrators may launch giveaways to randomly distribute Telegram Premium subscriptions and other gifts among their followers, in exchange for boosts.

Telegram clients must handle special tg:// and t.me deep links encountered in messages, link entities and in other apps by registering OS handlers.

Channel and supergroup boosts #

Telegram Premium users can grant their favorite channels and supergroups additional features like the ability to post stories by giving them boosts.

Bot Payments API #