channels.exportMessageLink #

Get link and embed info of a message in a channel/supergroup

Layer 223

exportedMessageLink#5dab1af4 link:string html:string = ExportedMessageLink;
---functions---
channels.exportMessageLink#e63fadeb flags:# grouped:flags.0?true thread:flags.1?true channel:InputChannel id:int = ExportedMessageLink;

Parameters #

NameTypeDescription
flags#Flags, see TL conditional fields
groupedflags.0?trueWhether to include other grouped media (for albums)
threadflags.1?trueWhether to also include a thread ID, if available, inside of the link
channelInputChannelChannel
idintMessage ID

Result #

ExportedMessageLink

Only users can use this method #

Possible errors #

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400MESSAGE_ID_INVALIDThe provided message id is invalid.
400MSG_ID_INVALIDInvalid message ID provided.

Channels, supergroups, gigagroups and basic groups #

How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.