Mega icon

Mega

Work with Mega API

Message → Get Many

AI-generated

Summary

Retrieve multiple messages from a specified conversation, optionally filtering to messages before or after given message IDs.

Inputs

  • Conversation ID (required) — Numeric ID of the conversation from which to fetch messages.
  • After Message ID — Optional numeric message ID to fetch messages sent after this ID.
  • Before Message ID — Optional numeric message ID to fetch messages sent before this ID.

Output shape

a list of message objects from the specified conversation

Pagination is controlled by the 'After Message ID' and 'Before Message ID' filters; if these are set to 0 or omitted, the API fetches messages without date constraints.

Links

Discussion