SuperAPI AI Directory

lark-contact

Office & productivity

View repository

Updated 10-14 05:33

About this skill

Which command to choose

User identity and 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 an 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 have an open_id and just want to send a message / schedule an event, you don't need to go through contact -- just directly lark-im / lark-calendar。

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

The names users give 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 like bot / agent / AI / assistant / robot / agent / assistant, etc., searching for bots first is faster
  • 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 status / personal signatures (use schema to check the parameters first).

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 the search returns multiple matches and the follow-up action has side effects (sending messages, inviting to meetings, etc.), present the candidates to the user to choose; do not arbitrarily pick the first one.

Search bots / agents

+search-bot Use the user identity to search for 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 (all three commands may encounter this). For details, see lark-shared。
  • Cross-tenant users(is_cross_tenant=trueMost business fields are empty strings; this is Feishu's visibility rule, and downstream should provide null-value fallbacks.
  • ID type:+get-user can be via --user-id-type uses open_id、union_id or user_id;+search-user uses the user's 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 / check chat history → lark-im
  • Schedule events / invite to meetings → lark-calendar
  • Department tree / list employees by department / organizational structure → lark-openapi-explorer Find the native interface