Skip to content

message_get

message_get returns a single message from a channel or thread. Use it when you have a message ID, such as from a link or a reply, but not the message.

To fetch several messages at once, use messages_batch.

{
"cmd": "message_get",
"channel": "general",
"id": "7d0e4c1a-5b8f-4b0e-8f55-2d3c9a61e7b4"
}
Field Type Required Description
channel string One of channel or thread_id Channel name.
thread_id string One of channel or thread_id Thread ID. If you also send channel, it must be the thread’s parent.
id string Yes ID of the message.
{
"cmd": "message_get",
"channel": "general",
"message": {
"id": "7d0e4c1a-5b8f-4b0e-8f55-2d3c9a61e7b4",
"user": "alice",
"author_id": "<alice's user ID>",
"timestamp": 1788940000.31,
"content": "Release notes are up: https://example.com/changelog"
}
}

message is a message object. A thread response has thread_id, and channel is the thread’s parent.

You must be able to view the channel, or the thread’s parent channel.

val When
Channel not found The channel doesn’t exist, or you sent neither channel nor thread_id.
Thread not found No thread has this ID.
Thread does not belong to this channel channel is not the thread’s parent.
You do not have permission to view this thread You can’t view the thread’s parent channel.
Messages must be sent inside a thread in forum channels channel is a forum and you sent no thread_id.
This channel does not support chat channel is a separator.
Access denied to this channel You can’t view the channel.
Message not found No message with this ID is there, or its author is severed from you.

A validation message is returned when id is missing or empty.