Airgram

Guides
/
/
Methods

api.getWebPagePreview()

Returns a web page preview by the text of the message. Do not call this function too often. Returns a 404 error if the web page has no preview

Parameters GetWebPagePreviewParams:

NameTypeDescription
text Message text with formatting
Returns ApiResponse interface:
interface ApiResponse {
  _: 'getWebPagePreview' | 'error'
  airgram: Airgram
  request: {
    method: 'getWebPagePreview'
    params: GetWebPagePreviewParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}