AI-generated Key Takeaways
-
The
Userresource 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
Userresource only includes thenameandtypefields. -
The
typefield indicates whether the user isHUMANorBOT, whileisAnonymoussignifies a deleted or invisible profile. -
The
displayNameanddomainIdprovide additional user information but might not be populated in all contexts.
A user in Google Chat. When returned as an output from a request, if your Chat app authenticates as a user
, the output for a User
resource only populates the user's name
and type
.
| JSON representation |
|---|
{
"name"
:
string
,
"displayName"
:
string
,
"domainId"
:
string
,
"type"
:
enum (
|
name
string
Resource name for a Google Chat user
.
Format: users/{user}
. users/app
can be used as an alias for the calling app bot
user.
For human users
, {user}
is the same user identifier as:
-
the
idfor the Person in the People API. For example,users/123456789in Chat API represents the same person as the123456789Person profile ID in People API. -
the
idfor a user in the Admin SDK Directory API. -
the user's email address can be used as an alias for
{user}in API requests. For example, if the People API Person profile ID foruser@example.comis123456789, you can useusers/user@example.comas an alias to referenceusers/123456789. Only the canonical resource name (for exampleusers/123456789) will be returned from the API.
displayName
string
Output only. The user's display name.
domainId
string
Unique identifier of the user's Google Workspace domain.
type
enum (
Type
)
User type.
isAnonymous
boolean
Output only. When true
, the user is deleted or their profile is not visible.
Type
| Enums | |
|---|---|
TYPE_UNSPECIFIED
|
Default value for the enum. DO NOT USE. |
HUMAN
|
Human user. |
BOT
|
Chat app user. |

