用户的电子邮件地址可在 API 请求中用作 {user} 的别名。例如,如果 user@example.com 的 People API Person 个人资料 ID 为 123456789,则可以使用 users/user@example.com 作为别名来引用 users/123456789。API 只会返回规范资源名称(例如 users/123456789)。
[null,null,["最后更新时间 (UTC):2025-02-27。"],[[["The `User` resource represents a Google Chat user, which can be a human or a Chat app."],["A user's resource name is formatted as `users/{user}`, with various identifiers like email or People API ID usable for `{user}`."],["When a Chat app authenticates as a user, the API response for the `User` resource only includes the `name` and `type` fields."],["The `type` field indicates whether the user is `HUMAN` or `BOT`, while `isAnonymous` signifies a deleted or invisible profile."],["The `displayName` and `domainId` provide additional user information but might not be populated in all contexts."]]],["The JSON representation defines a user with fields including `name` (resource identifier), `displayName` (user's name), `domainId` (Google Workspace domain), `type` (user or bot), and `isAnonymous` (deleted/hidden profile status). The `name` field uses aliases like email or People API ID. User types include `HUMAN` and `BOT`. Authenticated Chat app users only show `name` and `type` in request outputs. `type` is an enum with possible values like `HUMAN` and `BOT`.\n"]]