larksuite / larksuite/cli

Task inline images (description & comments) are unreachable — content returns "[Image]" with no downloadable media token

Open
#1,746 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug domain/task
Dominant language
Go
Stars
17.3k
Forks
1.4k
Avg merge
2d 4h
Merged PRs (30d)
105

Description

Summary

For Tasks (task/v2), images embedded in a task description or in a comment are not retrievable via the CLI / OpenAPI. The content field only returns the literal placeholder "[Image]" and there is no file_token / media reference anywhere to download the actual image.

Environment
  • @larksuite/cli 1.0.7 (also reproduced against current API)
  • identity: user (token has task:task:read, task:tasklist:read, task:comment:write, task:custom_field:read/write, etc.)
Repro
  1. A task whose description contains an inline image:
    lark-cli api GET /open-apis/task/v2/tasks/<task_guid>
    # => data.task.description == "[Image]"   (no token, no media object)
    
  2. A comment that is an image:
    lark-cli api GET /open-apis/task/v2/comments --params '{"resource_type":"task","resource_id":"<task_guid>","page_size":50}'
    # => item.content == "[Image]"
    # comment object fields: content / created_at / creator / id / resource_id / resource_type / updated_at
    #   -> no attachment, no file_token, no rich-content blocks
    
  3. The attachments endpoint cannot help — it only accepts task / task_delivery:
    lark-cli api GET /open-apis/task/v2/attachments --params '{"resource_type":"task","resource_id":"<task_guid>"}'
    # => data.items == []   (inline description/comment images are NOT listed here)
    
    lark-cli api GET /open-apis/task/v2/attachments --params '{"resource_type":"comment","resource_id":"<comment_id>"}'
    # => 1470400 Invalid Param 'resource_type'. Only 'task', 'task_delivery' are supported.
    

So there is no path from a task/comment to the bytes of an inline image.

Impact

Agents/automation that triage bugs from Lark task todos routinely need to read the screenshot in the description/comment (that's often the entire bug report). Today it's a hard dead end — the human has to manually download from the Lark UI.

Request (either works)
  • Expose the media file_token (or a media/rich_content block) for task description and comment images in the task/v2 responses, and/or
  • Add a task +media-download (mirroring docs +media-download / the undocumented +media-preview fallback in #860) that resolves a task/comment inline image to a downloadable file.

Related: #860 (docs media-download 403 + +media-preview fallback), #406 (unify media/attachment download under drive), #259 (docs +fetch --resolve-media). Tasks currently has no equivalent.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the task/v2 task and comment responses, the task/v2 attachments endpoint, and the existing docs +media-download or +media-preview behavior referenced in #860. Done means an inline image from a task description or comment exposes usable media or is downloadable through a documented task command, without relying on the Lark UI.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, openapi
Domain
api, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.