Airgram

Guides
/
/
Methods

api.getMessageEmbeddingCode()

Returns an HTML code for embedding the message. Available only for messages in supergroups and channels with a username

Parameters GetMessageEmbeddingCodeParams:

NameTypeDescription
chatIdnumber Identifier of the chat to which the message belongs
messageIdnumber Identifier of the message
forAlbumboolean Pass true to return an HTML code for embedding of the whole media album
Returns ApiResponse interface:
interface ApiResponse {
  _: 'getMessageEmbeddingCode' | 'error'
  airgram: Airgram
  request: {
    method: 'getMessageEmbeddingCode'
    params: GetMessageEmbeddingCodeParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}