Layer 220
ChannelsExportMessageLink
Get link and embed info of a message in a channel/supergroup
method
Users
channels.exportMessageLink#e63fadeb flags:# grouped:flags.0?true thread:flags.1?true channel:InputChannel id:int = ExportedMessageLink;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Grouped | flags.0?true | Whether to include other grouped media (for albums) |
| Thread | flags.1?true | Whether to also include a thread ID, if available, inside of the link |
| Channel | InputChannel | Channel |
| Id | int | Message ID |
Returns
ExportedMessageLinkPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 400 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup. |
| 400 | MESSAGE_ID_INVALID | The provided message id is invalid. |
| 400 | MSG_ID_INVALID | Invalid message ID provided. |
Gogram Example
// ChannelsExportMessageLink - using Params struct result, err := client.ChannelsExportMessageLink(&tg.ChannelsExportMessageLinkParams{ Channel: &tg.InputChannel{ChannelID: int64(123456789), AccessHash: int64(0)}, Id: 0, // Optional fields: // Grouped: true, // Thread: true, }) if err != nil { // handle error } // result is *tg.ExportedMessageLink