Page Summary
-
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 (such as in the Messages and Memberships APIs) only populates the name and type fields for both internal and external users, unless they are members of the space or have prior affinity with the calling user.
| JSON representation |
|---|
{
"name": string,
"displayName": string,
"avatarUrl": string,
"email": string,
"domainId": string,
"type": enum ( |
| Fields | |
|---|---|
name |
Resource name for a Google Chat Format: For
|
displayName |
Output only. The user's display name. Populated for both app authentication and user authentication. This field is always populated for requests made with app authentication. When calling the Messages and Memberships APIs with user authentication, this field is populated for both internal and external users for the |
avatarUrl |
Output only. The user's avatar image URL. When calling the Messages and Memberships APIs with user authentication, this field is populated for both internal and external users for the |
email |
Output only. The user's email address. When calling the Messages and Memberships APIs with user authentication, this field is populated for both internal and external users for the |
domainId |
Unique identifier of the user's Google Workspace domain. |
type |
User type. |
isAnonymous |
Output only. When |
Type
| Enums | |
|---|---|
TYPE_UNSPECIFIED |
Default value for the enum. DO NOT USE. |
HUMAN |
Human user. |
BOT |
Chat app user. |