Skip to content

SponsoredMessage

Type · TDLib 1.8.67 · d1085f9c

Describes a sponsored message

SponsoredMessage(
  message_id: int53,
  is_recommended: Bool,
  can_be_reported: Bool,
  content: MessageContent,
  sponsor: AdvertisementSponsor,
  title: string,
  button_text: string,
  accent_color_id: int32,
  background_custom_emoji_id: int64,
  additional_info: string
) → SponsoredMessage

message_id

int53

Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages

Bool

True, if the message needs to be labeled as "recommended" instead of "sponsored"

can_be_reported

Bool

True, if the message can be reported to Telegram moderators through reportChatSponsoredMessage

content

MessageContent

Content of the message. Currently, can be only of the types messageText, messageAnimation, messagePhoto, or messageVideo. Video messages can be viewed fullscreen. The content must be fully downloaded before the message is shown

AdvertisementSponsor

Information about the sponsor of the message

title

string

Title of the sponsored message

button_text

string

Text for the message action button

accent_color_id

int32

Identifier of the accent color for title, button text and message background

background_custom_emoji_id

int64

Identifier of a custom emoji to be shown on the message background; 0 if none

additional_info

string

If non-empty, additional information about the sponsored message to be shown along with the message