wiki +node-create returns a URL with www.feishu.cn host, but docs +update against that URL fails — must rewrite to my.feishu.cn
Summary
lark-cli wiki +node-create returns the freshly-created node's URL in its response under data.url. The host portion is https://www.feishu.cn/wiki/<token>.
For agents and users that paste that URL into the next command — typically lark-cli docs +update --doc <url> to populate the new node — the call works because the token is parsed out of the URL, but the returned URL is inconsistent with the rest of the lark-cli ecosystem, which assumes the user is on my.feishu.cn (the host the user actually browses to).
Concretely:
- The Feishu personal tenant host that all
lark-cli commands the user actually runs target is my.feishu.cn.
wiki +node-create returns www.feishu.cn.
- The user/agent who copies that URL into a browser to verify will hit the wrong tenant (the international
www.feishu.cn tenant), not see their newly-created page, and assume creation failed.
Repro
$ lark-cli wiki +node-create \
--space-id <my space id> \
--parent-node-token <my parent> \
--title "Test Node" \
--obj-type docx
{
"ok": true,
"data": {
"node_token": "...",
"obj_token": "...",
"url": "https://www.feishu.cn/wiki/<node_token>" // ← host should match the user's tenant
}
}
But the user / agent typically does subsequent operations like:
lark-cli docs +update --doc "https://my.feishu.cn/wiki/<node_token>" --mode overwrite --markdown -
— i.e. they have to rewrite www.feishu.cn to my.feishu.cn before reusing the URL elsewhere or pasting it into a browser.
Proposal
Return the URL on the host that matches the tenant the CLI is authenticated against. For users authenticated against my.feishu.cn, the response should be:
"url": "https://my.feishu.cn/wiki/<node_token>"
The mapping from tenant identity → host is already known to lark-cli (it's used by auth login and by all subsequent commands), so plumbing it into the wiki +node-create response is straightforward.
If the tenant host is genuinely ambiguous (e.g. cross-region apps), at minimum the response should not hard-code www.feishu.cn.
Environment
- lark-cli 1.0.27
- macOS, Node.js, user mode against the China-mainland
feishu.cn tenant family
wiki +node-createreturns a URL withwww.feishu.cnhost, butdocs +updateagainst that URL fails — must rewrite tomy.feishu.cnSummary
lark-cli wiki +node-createreturns the freshly-created node's URL in its response underdata.url. The host portion ishttps://www.feishu.cn/wiki/<token>.For agents and users that paste that URL into the next command — typically
lark-cli docs +update --doc <url>to populate the new node — the call works because the token is parsed out of the URL, but the returned URL is inconsistent with the rest of the lark-cli ecosystem, which assumes the user is onmy.feishu.cn(the host the user actually browses to).Concretely:
lark-clicommands the user actually runs target ismy.feishu.cn.wiki +node-createreturnswww.feishu.cn.www.feishu.cntenant), not see their newly-created page, and assume creation failed.Repro
$ lark-cli wiki +node-create \ --space-id <my space id> \ --parent-node-token <my parent> \ --title "Test Node" \ --obj-type docx{ "ok": true, "data": { "node_token": "...", "obj_token": "...", "url": "https://www.feishu.cn/wiki/<node_token>" // ← host should match the user's tenant } }But the user / agent typically does subsequent operations like:
lark-cli docs +update --doc "https://my.feishu.cn/wiki/<node_token>" --mode overwrite --markdown -— i.e. they have to rewrite
www.feishu.cntomy.feishu.cnbefore reusing the URL elsewhere or pasting it into a browser.Proposal
Return the URL on the host that matches the tenant the CLI is authenticated against. For users authenticated against
my.feishu.cn, the response should be:The mapping from tenant identity → host is already known to
lark-cli(it's used byauth loginand by all subsequent commands), so plumbing it into thewiki +node-createresponse is straightforward.If the tenant host is genuinely ambiguous (e.g. cross-region apps), at minimum the response should not hard-code
www.feishu.cn.Environment
feishu.cntenant family