Skip to content

[Bug] POST /board/v1/whiteboards/{id}/nodes fails with "invalid objType [@from@] whiteboard" for Wiki-embedded whiteboards #98

@mokmoth

Description

@mokmoth

Description

When calling POST /open-apis/board/v1/whiteboards/{whiteboard_id}/nodes to create nodes on a whiteboard that is embedded inside a Wiki document, the API returns a server error with an unresolved template variable in the error message.

The same API call works correctly for whiteboards embedded in docx documents.

Steps to Reproduce

  1. Create a Wiki page containing an embedded whiteboard (画板) block
  2. Get the whiteboard token via lark-cli docs +fetch --doc <wiki_url> --as user
  3. Attempt to create a node:
curl -X POST "https://open.feishu.cn/open-apis/board/v1/whiteboards/{wiki_whiteboard_token}/nodes" \
  -H "Authorization: Bearer {user_access_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "nodes": [{
      "type": "text_shape",
      "x": 100, "y": 100, "width": 200, "height": 40,
      "text": {"text": "test"}
    }]
  }'
Expected Behavior
Node should be created successfully (code: 0), as it does for docx-embedded whiteboards.

Actual Behavior
{
  "code": 5000000,
  "msg": "invalid objType [@from@] whiteboard"
}
The @from@ appears to be an unresolved server-side template variable that should be substituted with the source document type.

Scenario | Result
-- | --
GET .../nodes on Wiki whiteboard | ✅ Works (returns all nodes)
POST .../nodes on docx whiteboard | ✅ Works (code=0, nodes created)
POST .../nodes on Wiki whiteboard | ❌ Fails (code=5000000)
The same user_access_token and identical node payload were used in all cases. The whiteboard token was obtained from the docx blocks API (GET /docx/v1/documents/{doc_id}/blocks, block_type=43). The Wiki page's underlying obj_type is docx (confirmed via GET /wiki/v2/spaces/get_node), and the whiteboard token is the same whether accessed through the Wiki URL or the underlying docx token.

Environment
lark-cli version: 1.0.0
Auth: user_access_token (OAuth authorization_code flow)
Scopes: board:whiteboard:node:create, board:whiteboard:node:read, board:whiteboard:node:delete
Region: feishu.cn

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions