feishu-message

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Feishu Message Tool

Feishu 消息工具

Single tool
feishu_message
for reading Feishu messages — get a single message by ID or list recent messages in a chat.
feishu_message
是一款用于读取Feishu消息的独立工具——可通过ID获取单条消息,或列出聊天中的近期消息。

Actions

操作

Get Single Message

获取单条消息

json
{
  "action": "get",
  "message_id": "om_xxx"
}
Returns:
json
{
  "ok": true,
  "action": "get",
  "found": true,
  "message_id": "om_xxx",
  "msg_type": "text",
  "content": "Hello world",
  "sender_id": "ou_xxx",
  "sender_type": "user",
  "chat_id": "oc_xxx",
  "create_time": "1710000000000",
  "update_time": "1710000000000",
  "mentions": []
}
json
{
  "action": "get",
  "message_id": "om_xxx"
}
返回结果:
json
{
  "ok": true,
  "action": "get",
  "found": true,
  "message_id": "om_xxx",
  "msg_type": "text",
  "content": "Hello world",
  "sender_id": "ou_xxx",
  "sender_type": "user",
  "chat_id": "oc_xxx",
  "create_time": "1710000000000",
  "update_time": "1710000000000",
  "mentions": []
}

List Recent Messages

列出近期消息

List recent messages in a chat (DM or group), newest first by default. Omit
chat_id
to use the current conversation's chat:
json
{
  "action": "list"
}
With custom page size, sort order, and time range:
json
{
  "action": "list",
  "chat_id": "oc_xxx",
  "page_size": 20,
  "sort_type": "ByCreateTimeAsc",
  "start_time": "1710000000",
  "end_time": "1710086400"
}
Returns:
json
{
  "ok": true,
  "action": "list",
  "chat_id": "oc_xxx",
  "total": 10,
  "messages": [
    {
      "message_id": "om_xxx",
      "msg_type": "text",
      "content_preview": "Hello world",
      "sender_id": "ou_xxx",
      "sender_type": "user",
      "create_time": "1710000000000",
      "chat_id": "oc_xxx"
    }
  ]
}
列出聊天(单聊或群聊)中的近期消息,默认按最新消息排序。 省略
chat_id
则使用当前会话的聊天ID:
json
{
  "action": "list"
}
自定义分页大小、排序方式和时间范围:
json
{
  "action": "list",
  "chat_id": "oc_xxx",
  "page_size": 20,
  "sort_type": "ByCreateTimeAsc",
  "start_time": "1710000000",
  "end_time": "1710086400"
}
返回结果:
json
{
  "ok": true,
  "action": "list",
  "chat_id": "oc_xxx",
  "total": 10,
  "messages": [
    {
      "message_id": "om_xxx",
      "msg_type": "text",
      "content_preview": "Hello world",
      "sender_id": "ou_xxx",
      "sender_type": "user",
      "create_time": "1710000000000",
      "chat_id": "oc_xxx"
    }
  ]
}

Parameters

参数

ParameterRequiredDescription
action
Yes
get
or
list
message_id
get: YesFeishu message ID (e.g.,
om_xxx
)
chat_id
list: OptionalChat ID (e.g.,
oc_xxx
). Omit to use current chat.
page_size
list: OptionalNumber of messages (default: 10, max: 50)
sort_type
list: Optional
ByCreateTimeDesc
(default) or
ByCreateTimeAsc
start_time
list: OptionalUnix timestamp in seconds (e.g.,
"1710000000"
). No lower bound if omitted.
end_time
list: OptionalUnix timestamp in seconds (e.g.,
"1710086400"
). No upper bound if omitted.
参数是否必填说明
action
get
(获取单条)或
list
(列出多条)
message_id
get
时必填
Feishu消息ID(例如:
om_xxx
chat_id
list
时可选
聊天ID(例如:
oc_xxx
)。省略则使用当前聊天ID。
page_size
list
时可选
消息数量(默认:10,最大值:50)
sort_type
list
时可选
ByCreateTimeDesc
(默认,按创建时间降序)或
ByCreateTimeAsc
(按创建时间升序)
start_time
list
时可选
Unix时间戳(秒级,例如:
"1710000000"
)。省略则无时间下限。
end_time
list
时可选
Unix时间戳(秒级,例如:
"1710086400"
)。省略则无时间上限。

Configuration

配置

yaml
channels:
  feishu:
    tools:
      message: true  # default: true
yaml
channels:
  feishu:
    tools:
      message: true  # 默认值:true

Permissions

权限

  • im:message
    or
    im:message:readonly
    — read single/DM messages
  • im:message.group_at_msg:readonly
    — read all messages in group chats (not just @bot messages)
  • im:message
    im:message:readonly
    —— 读取单条消息/单聊消息
  • im:message.group_at_msg:readonly
    —— 读取群聊中的所有消息(不仅是@机器人的消息)