联系客服 新闻资讯 所有频道 使用说明 芯片选型

Get a message's raw Markdown

Get the raw content of a message.

GET https://we.comake.online/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 -sSX GET -G https://we.comake.online/api/v1/messages/42 \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY

Parameters

message_id integer required in path

Example: 42

The target message's ID.


Response

Return values

  • raw_content: string 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"
}