Get a raw message

Get the raw content of a message.

GET https://zulip.d4science.org/api/v1/messages/<msg_id>

This is a rarely-used endpoint relevant for clients that primarily work with HTML-rendered messages but might need to occasionally fetch the message's raw markdown (e.g. for pre-filling a message-editing UI).

Usage examples

#!/usr/bin/env python3

import zulip

# Pass the path to your zuliprc file here.
client = zulip.Client(config_file="~/zuliprc")

# Get the raw content of the message with ID "message_id"
result = client.get_raw_message(message_id)
print(result)

curl -X GET https://zulip.d4science.org/api/v1/messages/<msg_id> \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY \

Arguments

Argument Example Required Description
message_id 42 Yes

The target message's ID.

Response

Return values

  • raw_content: The raw content of the message.

Example response

A typical successful JSON response may look like:

{
    "msg": "",
    "raw_content": "**Don't** forget your towel!",
    "result": "success"
}

An example JSON response for when the specified message does not exist or it is not visible to the user making the query (e.g. it was a PM between other two users):

{
    "code": "BAD_REQUEST",
    "msg": "Invalid message(s)",
    "result": "error"
}