message

A message

message#452c0e65 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true id:int from_id:flags.8?int to_id:Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?int reply_to_msg_id:flags.3?int date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector<MessageEntity> views:flags.10?int edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long restriction_reason:flags.22?Vector<RestrictionReason> = Message;

Parameters

Name Type Description
flags # Flags, see TL conditional fields
out flags.1?true Is this an outgoing message
mentioned flags.4?true Whether we were mentioned in this message
media_unread flags.5?true Whether there are unread media attachments in this message
silent flags.13?true Whether this is a silent message (no notification triggered)
post flags.14?true Whether this is a channel post
from_scheduled flags.18?true Whether this is a scheduled message
legacy flags.19?true This is a legacy message: it has to be refetched with the new layer
edit_hide flags.21?true Whether the message should be shown as not modified to the user, even if an edit date is present
pinned flags.24?true Whether this message is pinned
noforwards flags.26?true Whether this message is protected and thus cannot be forwarded; clients should also prevent users from saving attached media (i.e. videos should only be streamed, photos should be kept in RAM, et cetera).
invert_media flags.27?true If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.
flags2 # Flags, see TL conditional fields
offline flags2.1?true If set, the message was sent because of a scheduled action by the message sender, for example, as away, or a greeting service message.
id int ID of the message
from_id flags.8?Peer ID of the sender of the message
from_boosts_applied flags.29?int Supergroups only, contains the number of boosts this user has given the current supergroup, and should be shown in the UI in the header of the message.
Only present for incoming messages from non-anonymous supergroup members that have boosted the supergroup.
Note that this counter should be locally overridden for non-anonymous outgoing messages, according to the current value of channelFull.boosts_applied, to ensure the value is correct even for messages sent by the current user before a supergroup was boosted (or after a boost has expired or the number of boosts has changed); do not update this value for incoming messages from other users, even if their boosts have changed.
peer_id Peer Peer ID, the chat where this message was sent
saved_peer_id flags.28?Peer Messages fetched from a saved messages dialog » will have peer=inputPeerSelf and the saved_peer_id flag set to the ID of the saved dialog.
fwd_from flags.2?MessageFwdHeader Info about forwarded messages
via_bot_id flags.11?long ID of the inline bot that generated the message
via_business_bot_id flags2.0?long Whether the message was sent by the business bot specified in via_bot_id on behalf of the user.
reply_to flags.3?MessageReplyHeader Reply information
date int Date of the message
message string The message
media flags.9?MessageMedia Media attachment
reply_markup flags.6?ReplyMarkup Reply markup (bot/inline keyboards)
entities flags.7?Vector<MessageEntity> Message entities for styled text
views flags.10?int View count for channel posts
forwards flags.10?int Forward counter
replies flags.23?MessageReplies Info about post comments (for channels) or message replies (for groups)
edit_date flags.15?int Last edit date of this message
post_author flags.16?string Name of the author of this message for channel posts (with signatures enabled)
grouped_id flags.17?long Multiple media messages sent using messages.sendMultiMedia with the same grouped ID indicate an album or media group
reactions flags.20?MessageReactions Reactions to this message
restriction_reason flags.22?Vector<RestrictionReason> Contains the reason why access to this message must be restricted.
ttl_period flags.25?int Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well.
quick_reply_shortcut_id flags.30?int If set, this message is a quick reply shortcut message » (note that quick reply shortcut messages sent to a private chat will not have this field set).
effect flags2.2?long A message effect that should be played as specified here ».
factcheck flags2.3?FactCheck Represents a fact-check ».

Type

Message

Related pages

Mentions

Telegram allows mentioning other users in case of urgent duckling matters, and quickly navigating to those mentions in order to read them as swiftly as possible.

Scheduled messages

Telegram allows scheduling messages

Pinned messages

Telegram allows pinning multiple messages on top of a specific chat.

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.

channelFull

Full info about a channel, supergroup or gigagroup.

When updating the local peer database », all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).

Saved messages

The Saved Messages chat allows users to bookmark messages and media: it's a personal cloud storage for any messages or media you may want to send or forward there.

inputPeerSelf

Defines the current user.

Business

Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.

Styled text with message entities

How to create styled text with message entities

Threads

Telegram allows commenting on a channel post or on a generic supergroup message, thanks to message threads.

messages.sendMultiMedia

Send an album or grouped media

Uploading and Downloading Files

How to transfer large data batches correctly.

Animated message effects

Telegram allows adding spectacular animated effects to messages you send.

Fact-checks

Telegram clients support displaying fact-checks added to messages by independent fact-checkers.