Wechat Work Node icon

Wechat Work Node

Wechat Work Node

用户管理 → 通过邮箱获取用户ID

AI-generated

Summary

Retrieve the user ID of a WeChat Work user by providing their email address and specifying the email type (enterprise or personal).

Inputs

  • email (required) — The user's email address to search for.
  • email_type — The type of email: 1 for enterprise email (default), or 2 for personal email.

Output shape

a JSON object containing the retrieved user ID corresponding to the given email

The operation sends a POST request to the /cgi-bin/user/get_userid_by_email endpoint with the email and email type, and returns the API response which includes the user ID. If an error occurs (non-zero errcode), the operation throws an error.

Links

Discussion