SuperAPI AI Directory

lark-contact

Office & productivity

View repository

Updated 10-14 05:52

About this skill

Which command to choose

The user identity and the bot identity are two completely independent paths. First determine the current identity, then choose a command from the table below:

What you want to do user identity bot identity
Search employees by name / email to get open_id +search-user Not supported
Search bots / agents visible to the current user by keyword +search-bot Not supported
Get another person's profile given a known open_id +search-user --user-ids <id> +get-user --user-id <id>
View yourself +get-user or +search-user --user-ids me Not supported
Check a colleague's personal status / signature user_profiles batch_query Not supported

If you already know the open_id and just want to send a message / schedule a meeting, you don't need to go through contact — just lark-im / lark-calendar。

The name doesn't make it clear whether it's a person or a bot / agent

Names given by users often don't indicate the type. For example, reviewDuck in "schedule a meeting with reviewDuck" could be a colleague's nickname or a bot.

  • When the name contains obvious markers such as bot / agent / AI / 助手 / 机器人 / 智能体 / assistant, it's faster to search bots first instead
  • If unsure, search both sides

Typical scenarios

Find Zhang San and send him a message: search first, confirm the open_id, then send:

lark-cli contact +search-user --query "张三" --has-chatted --as user
lark-cli im +messages-send --user-id ou_xxx --text "Hi!"

Batch-check colleagues' personal statuses / personal signatures (use schema first to see the parameters).

lark-cli schema contact.user_profiles.batch_query
lark-cli contact user_profiles batch_query \
  --params '{"user_id_type":"open_id"}' \
  --data '{"user_ids":["ou_xxx","ou_yyy"],"query_option":{"include_personal_status":true,"include_description":true}}' \
  --as user

If a search hits multiple results and the follow-up action has side effects (sending messages, inviting to meetings, etc.), present the candidates to the user to choose; don't arbitrarily pick the first one.

Search bots / agents

+search-bot Use the user identity to search bots visible to the current user by keyword, returning bot open_ids starting with ou_ . For parameter details, see lark-contact-search-bot.md。

lark-cli contact +search-bot --query '会议助手' --as user
lark-cli contact +search-bot --queries '会议助手,日报助手,审批助手' --as user

Notes

  • 41050 / Permission denied is limited by the visibility scope of the current identity (can occur with all three commands). For details, see lark-shared。
  • cross-tenant users(is_cross_tenant=true), most business fields are empty strings; this is a Feishu visibility rule, and downstream should handle empty values with a fallback.
  • ID type:+get-user can be used via --user-id-type using open_id、union_id or user_id;+search-user using the user open_id;+search-bot does not support lookup by ID; it searches by keyword and returns bot open_ids.

Out of scope for this skill

  • Send messages / view chat history → lark-im
  • Schedule meetings / invite to meetings → lark-calendar
  • Department tree / list employees by department / organizational structure → lark-openapi-explorer look up the native API