Skip to main content

webPage

Webpage preview

type tg.WebPage struct { /* ... */ }

Implements WebPage.

Fields​

NameTypeRequiredDescription
HasLargeMediabool—Whether the size of the media in the preview can be changed.
VideoCoverPhotobool—Represents a custom video cover.
IDint64yesPreview ID
URLstringyesURL of previewed webpage
DisplayURLstringyesWebpage URL to be displayed to the user
HashintyesHash used for caching, for more info click here
Typestring—Type of the web page. One of the following: - app- article- document- gif- photo- profile- telegram_album- telegram_auction- telegram_background- telegram_bot- telegram_botapp- telegram_call- telegram_channel- telegram_channel_boost- telegram_channel_direct- telegram_channel_request- telegram_chat- telegram_chat_request- telegram_chatlist- telegram_collection- telegram_community- telegram_giftcode- telegram_group_boost- telegram_livestream- telegram_megagroup- telegram_megagroup_request- telegram_message- telegram_newbot- telegram_nft- telegram_stickerset- telegram_story- telegram_story_album- telegram_theme- telegram_user- telegram_videochat- telegram_voicechat- video
SiteNamestring—Short name of the site (e.g., Google Docs, App Store)
Titlestring—Title of the content
Descriptionstring—Content description
PhotoPhotoClass—Image representing the content
EmbedURLstring—URL to show in the embedded preview
EmbedTypestring—MIME type of the embedded preview, (e.g., text/html or video/mp4)
EmbedWidthint—Width of the embedded preview
EmbedHeightint—Height of the embedded preview
Durationint—Duration of the content, in seconds
Authorstring—Author of the content
DocumentDocumentClass—Preview of the content as a media file
CachedPagePage—Page contents in instant view format
Attributes[]WebPageAttributeClass—Webpage attributes

References​