Interface LinkPreview

Describes a link preview.

interface LinkPreview {
    @type: "linkPreview";
    author: string;
    description: FormattedText;
    display_url: string;
    has_large_media?: boolean;
    instant_view_version: number;
    show_above_text?: boolean;
    show_large_media?: boolean;
    show_media_above_description?: boolean;
    site_name: string;
    skip_confirmation?: boolean;
    title: string;
    type: LinkPreviewType;
    url: string;
}

Properties

@type: "linkPreview"
author: string

Author of the content.

description: FormattedText

Describes a link preview.

display_url: string

URL to display.

has_large_media?: boolean

True, if size of media in the preview can be changed.

instant_view_version: number

Version of instant view (currently, can be 1 or 2) for the web page; 0 if none.

show_above_text?: boolean

True, if the link preview must be shown above message text; otherwise, the link preview must be shown below the message text.

show_large_media?: boolean

True, if large media preview must be shown; otherwise, the media preview must be shown small and only the first frame must be shown for videos.

show_media_above_description?: boolean

True, if media must be shown above link preview description; otherwise, the media must be shown below the description.

site_name: string

Short name of the site (e.g., Google Docs, App Store).

skip_confirmation?: boolean

True, if there is no need to show an ordinary open URL confirmation, when opening the URL from the preview, because the URL is shown in the message text in clear.

title: string

Title of the content.

Type of the link preview.

url: string

Original URL of the link.