Skip to content

getPublicMessageLink

Sahri Riza Umami edited this page Jun 6, 2018 · 4 revisions

Returns a public HTTPS link to a message.
Available only for messages in public supergroups and channels.

getPublicMessageLink(chat_id, message_id, for_album)
Field Type Description
chat_id int53 Identifier of the chat to which the message belongs
message_id int53 Identifier of the message
for_album Bool Pass true if a link for a whole media album should be returned

Example

  • Get public HTTPS link to message 666 from chat 1234567890.
getPublicMessageLink(1234567890, 666)

Response:

{
  ["@type"] = "publicMessageLink",
  html = "<script async src=\"https://telegram.org/js/telegram-widget.js?2\" data-telegram-post=\"updateChatLastMessageupdateNewMe/666\" data-width=\"100%\"></script>",
  link = "https://t.me/updateChatLastMessageupdateNewMe/666"
}

Frequently Asked Questions
The Functions

Clone this wiki locally