telegram api constructor · layer 229 · #7dbf8673

sponsoredMessage

A sponsored message.

definition

sponsoredMessage#7dbf8673 flags:# recommended:flags.5?true can_report:flags.12?true random_id:bytes url:string title:string message:string entities:flags.1?Vector<MessageEntity> photo:flags.6?Photo media:flags.14?MessageMedia color:flags.13?PeerColor button_text:string sponsor_info:flags.7?string additional_info:flags.8?string min_display_duration:flags.15?int max_display_duration:flags.15?int = SponsoredMessage;

parameters

nametypedescription
flags#Flags, see TL conditional fields
recommendedflags.5?trueWhether the message needs to be labeled as "recommended" instead of "sponsored"
can_reportflags.12?trueWhether this message can be reported as specified here ».
random_idbytesMessage ID
urlstringContains the URL to open when the user clicks on the sponsored message.
titlestringContains the title of the sponsored message.
messagestringSponsored message
entitiesflags.1?Vector<MessageEntity>Message entities for styled text in message.
photoflags.6?PhotoIf set, contains a custom profile photo bubble that should be displayed for the sponsored message, like for messages sent in groups.
mediaflags.14?MessageMediaIf set, contains some media.
colorflags.13?PeerColorIf set, the sponsored message should use the message accent color » specified in color.
button_textstringLabel of the sponsored message button.
sponsor_infoflags.7?stringIf set, contains additional information about the sponsor to be shown along with the message.
additional_infoflags.8?stringIf set, contains additional information about the sponsored message to be shown along with the message.
min_display_durationflags.15?intFor sponsored messages to show on channel videos », allow the user to hide the ad only after the specified amount of seconds.
max_display_durationflags.15?intFor sponsored messages to show on channel videos », autohide the ad after after the specified amount of seconds.

type

SponsoredMessage

history

present in layers 132–229 · constructor id changed 8×

idlayers
#2a3c381f132–133
#d151e19a134–135
#3a836df8136–153
#fc25b828154–158
#daafff6b159–166
#ed5383f7167–177
#bdedf566178–185
#4d93a990186–204
#7dbf8673205–229