channels.exportMessageLink
Get link and embed info of a message in a channel/supergroup
func (c *Client) ChannelsExportMessageLink(ctx context.Context, request *ChannelsExportMessageLinkRequest) (*ExportedMessageLink, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.ChannelsExportMessageLink(ctx, &tg.ChannelsExportMessageLinkRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *ExportedMessageLink
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Grouped | bool | — | Whether to include other grouped media (for albums) |
Thread | bool | — | Whether to also include a thread ID, if available, inside of the link |
Channel | InputChannelClass | yes | Channel |
ID | int | yes | Message ID |
Returns
Possible 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. |
References
- Official documentation
- Generated Go reference
- TL definition:
channels.exportMessageLink#e63fadeb