Interface PremiumGiftCodeInfo

Contains information about a Telegram Premium gift code.

interface PremiumGiftCodeInfo {
    @type: "premiumGiftCodeInfo";
    creation_date: number;
    creator_id: MessageSender;
    giveaway_message_id: number;
    is_from_giveaway?: boolean;
    month_count: number;
    use_date: number;
    user_id: number;
}

Properties

@type: "premiumGiftCodeInfo"
creation_date: number

Point in time (Unix timestamp) when the code was created.

creator_id: MessageSender

Identifier of a chat or a user that created the gift code; may be null if unknown. If null and the code is from messagePremiumGiftCode message, then creator_id from the message can be used.

giveaway_message_id: number

Identifier of the corresponding giveaway message in the creator_id chat; can be 0 or an identifier of a deleted message.

is_from_giveaway?: boolean

True, if the gift code was created for a giveaway.

month_count: number

Number of months the Telegram Premium subscription will be active after code activation.

use_date: number

Point in time (Unix timestamp) when the code was activated; 0 if none.

user_id: number

Identifier of a user for which the code was created; 0 if none.