export_message_link()¶
- async Client.export_message_link()¶
Export an HTTP link to a message in a channel or supergroup.
- Parameters:
chat_id (
int|str) – Unique identifier (int) or username (str) of the target channel or supergroup.message_id (
int) – The message ID to get the link for.grouped (
bool, optional) – Whether to include other media in an album/media group.thread (
bool, optional) – Whether to include the thread context in the link.
- Returns:
str– On success, the exported HTTP link is returned.
Example
link = await app.export_message_link(chat_id, 123)