Rocket.Chat Extended icon

Rocket.Chat Extended

Extended Rocket.Chat operations: channels, messages, threads, reactions, file upload, and more

Direct Message → Get Messages

AI-generated

Summary

Fetch messages from a direct message conversation, optionally paginated.

Inputs

  • roomId (required) — The ID of the DM room to retrieve messages from.
  • returnAll — If true, return all messages without a limit; otherwise respect the limit parameter.
  • limit — Maximum number of messages to return when returnAll is false; default is 50, max 500.

Output shape

array of message objects

Pagination: limit defaults to 50; set returnAll true to fetch all; may include metadata like total count.

Examples

Example 1: Retrieve the last 20 messages from a DM with room ID '12345'.

roomId = 12345, limit = 20, returnAll = false

Example 2: Fetch all messages from a DM without imposing a limit.

roomId = 12345, returnAll = true

Links

Discussion