Skip to content

开放「标记消息」(Flagged Messages) 的 Open API #567

@wyqzos

Description

@wyqzos

场景描述 / Use Case:

飞书用户可以对消息进行「标记」(Flag),用于后续跟进。该数据在服务端存储并跨设备同步。但目前 Open API 没有暴露标记消息的查询接口,无法通过 API获取用户的标记消息列表。

我的使用场景:通过 AI Agent + lark-cli 自动拉取 Flagged Messages,进行分类和处理(如分流到 Backlog、TODO
等),提升消息处理效率。

期望的 API / Requested API:

  1. GET /open-apis/im/v1/flags — 获取当前用户的标记消息列表
    - 支持分页 (page_token, page_size)
    - 支持时间范围筛选 (start_time, end_time)
    - 返回 message_id, chat_id, flag_time 等字段
    - Identity: user_access_token
    - Scope: im:message:readonly 或新增 im:flag:read
  2. (可选) DELETE /open-apis/im/v1/flags/{message_id} — 取消标记

现有替代方案的不足 / Why existing APIs don't work:

  • im/v1/pins — 群级别置顶,非个人标记
  • im +messages-search — 需要关键词,无法按「已标记」筛选
  • 手动导出 — 不可自动化,效率低

补充说明:

标记数据已在服务端存储(跨设备同步可证明),开放读取接口的实现成本应较低。该功能对 AI Agent 自动化工作流有很高价值。

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdomain/authAuthentication subsystemdomain/imPR touches the im domain

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions