api.getMessageLink()
Returns an HTTPS link to a message in a chat. Available only for already sent messages in supergroups and channels, or if message.can_get_media_timestamp_links and a media timestamp link is generated. This is an offline request
Parameters
GetMessageLinkParams
:chevron_leftchevron_right
Parameters
Interface
Name | Type | Description |
---|---|---|
chatId | number | Identifier of the chat to which the message belongs |
messageId | number | Identifier of the message |
mediaTimestamp | number | If not 0, timestamp from which the video/audio/video note/voice note playing must start, in seconds. The media can be in the message content or in its web page preview |
forAlbum | boolean | Pass true to create a link for the whole media album |
forComment | boolean | Pass true to create a link to the message as a channel post comment, or from a message thread |
Returns
ApiResponse
interface:interface ApiResponse {
_: 'getMessageLink' | 'error'
airgram: Airgram
request: {
method: 'getMessageLink'
params: GetMessageLinkParams
}
response: |
setState: (nextState: Record<string, unknown>) => void
getState: () => Record<string, unknown>
}