Airgram

Guides
/
/
Methods

api.getMessages()

Returns information about messages. If a message is not found, returns null on the corresponding position of the result

Parameters GetMessagesParams:

NameTypeDescription
chatIdnumber Identifier of the chat the messages belong to
messageIdsnumber[] Identifiers of the messages to get
Returns ApiResponse interface:
interface ApiResponse {
  _: 'getMessages' | 'error'
  airgram: Airgram
  request: {
    method: 'getMessages'
    params: GetMessagesParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}