Reference documentation and code samples for the Google Chat V1 API class Google::Apps::Chat::V1::User.
A user in Google Chat.
When returned as an output from a request, if your Chat appauthenticates as
a
user,
the output for aUserresource only populates the user'snameandtype.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#display_name
defdisplay_name()->::String
Returns
(::String) — Output only. The user's display name.
#domain_id
defdomain_id()->::String
Returns
(::String) — Unique identifier of the user's Google Workspace domain.
#domain_id=
defdomain_id=(value)->::String
Parameter
value(::String) — Unique identifier of the user's Google Workspace domain.
Returns
(::String) — Unique identifier of the user's Google Workspace domain.
#is_anonymous
defis_anonymous()->::Boolean
Returns
(::Boolean) — Output only. Whentrue, the user is deleted or their profile is not
visible.
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.
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Chat V1 API - Class Google::Apps::Chat::V1::User (v0.15.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.15.0 (latest)](/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-User)\n- [0.14.0](/ruby/docs/reference/google-apps-chat-v1/0.14.0/Google-Apps-Chat-V1-User)\n- [0.13.0](/ruby/docs/reference/google-apps-chat-v1/0.13.0/Google-Apps-Chat-V1-User)\n- [0.12.0](/ruby/docs/reference/google-apps-chat-v1/0.12.0/Google-Apps-Chat-V1-User)\n- [0.11.1](/ruby/docs/reference/google-apps-chat-v1/0.11.1/Google-Apps-Chat-V1-User)\n- [0.10.0](/ruby/docs/reference/google-apps-chat-v1/0.10.0/Google-Apps-Chat-V1-User)\n- [0.9.1](/ruby/docs/reference/google-apps-chat-v1/0.9.1/Google-Apps-Chat-V1-User)\n- [0.8.0](/ruby/docs/reference/google-apps-chat-v1/0.8.0/Google-Apps-Chat-V1-User)\n- [0.7.0](/ruby/docs/reference/google-apps-chat-v1/0.7.0/Google-Apps-Chat-V1-User)\n- [0.6.0](/ruby/docs/reference/google-apps-chat-v1/0.6.0/Google-Apps-Chat-V1-User)\n- [0.5.1](/ruby/docs/reference/google-apps-chat-v1/0.5.1/Google-Apps-Chat-V1-User)\n- [0.4.0](/ruby/docs/reference/google-apps-chat-v1/0.4.0/Google-Apps-Chat-V1-User)\n- [0.3.1](/ruby/docs/reference/google-apps-chat-v1/0.3.1/Google-Apps-Chat-V1-User)\n- [0.2.0](/ruby/docs/reference/google-apps-chat-v1/0.2.0/Google-Apps-Chat-V1-User)\n- [0.1.2](/ruby/docs/reference/google-apps-chat-v1/0.1.2/Google-Apps-Chat-V1-User) \nReference documentation and code samples for the Google Chat V1 API class Google::Apps::Chat::V1::User.\n\nA user in Google Chat.\nWhen returned as an output from a request, if your Chat app [authenticates as\na\nuser](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),\nthe output for a `User` resource only populates the user's `name` and `type`. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #display_name\n\n def display_name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. The user's display name.\n\n### #domain_id\n\n def domain_id() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Unique identifier of the user's Google Workspace domain.\n\n### #domain_id=\n\n def domain_id=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Unique identifier of the user's Google Workspace domain. \n**Returns**\n\n- (::String) --- Unique identifier of the user's Google Workspace domain.\n\n### #is_anonymous\n\n def is_anonymous() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- Output only. When `true`, the user is deleted or their profile is not visible.\n\n### #name\n\n def name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Resource name for a Google Chat [user](/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-User \"Google::Apps::Chat::V1::User (class)\").\n\n Format: `users/{user}`. `users/app` can be used as an alias for the calling\n app [bot](/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-User-Type#Google__Apps__Chat__V1__User__Type__BOT \"Google::Apps::Chat::V1::User::Type::BOT (constant)\") user.\n\n For [human users](/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-User-Type#Google__Apps__Chat__V1__User__Type__HUMAN \"Google::Apps::Chat::V1::User::Type::HUMAN (constant)\"), `{user}` is the same\n user identifier as:\n - the `id` for the\n [Person](https://developers.google.com/people/api/rest/v1/people) in the\n People API. For example, `users/123456789` in Chat API represents the same\n person as the `123456789` Person profile ID in People API.\n\n - the `id` for a\n [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users)\n in the Admin SDK Directory API.\n\n - the user's email address can be used as an alias for `{user}` in API\n requests. For example, if the People API Person profile ID for\n `user@example.com` is `123456789`, you can use `users/user@example.com` as\n an alias to reference `users/123456789`. Only the canonical resource name\n (for example `users/123456789`) will be returned from the API.\n\n### #name=\n\n def name=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) ---\n\n Resource name for a Google Chat [user](/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-User \"Google::Apps::Chat::V1::User (class)\").\n\n Format: `users/{user}`. `users/app` can be used as an alias for the calling\n app [bot](/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-User-Type#Google__Apps__Chat__V1__User__Type__BOT \"Google::Apps::Chat::V1::User::Type::BOT (constant)\") user.\n\n For [human users](/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-User-Type#Google__Apps__Chat__V1__User__Type__HUMAN \"Google::Apps::Chat::V1::User::Type::HUMAN (constant)\"), `{user}` is the same\n user identifier as:\n - the `id` for the\n [Person](https://developers.google.com/people/api/rest/v1/people) in the\n People API. For example, `users/123456789` in Chat API represents the same\n person as the `123456789` Person profile ID in People API.\n\n - the `id` for a\n [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users)\n in the Admin SDK Directory API.\n\n - the user's email address can be used as an alias for `{user}` in API\n requests. For example, if the People API Person profile ID for\n `user@example.com` is `123456789`, you can use `users/user@example.com` as\n an alias to reference `users/123456789`. Only the canonical resource name\n (for example `users/123456789`) will be returned from the API.\n\n**Returns**\n\n- (::String) --- Resource name for a Google Chat [user](/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-User \"Google::Apps::Chat::V1::User (class)\").\n\n Format: `users/{user}`. `users/app` can be used as an alias for the calling\n app [bot](/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-User-Type#Google__Apps__Chat__V1__User__Type__BOT \"Google::Apps::Chat::V1::User::Type::BOT (constant)\") user.\n\n For [human users](/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-User-Type#Google__Apps__Chat__V1__User__Type__HUMAN \"Google::Apps::Chat::V1::User::Type::HUMAN (constant)\"), `{user}` is the same\n user identifier as:\n - the `id` for the\n [Person](https://developers.google.com/people/api/rest/v1/people) in the\n People API. For example, `users/123456789` in Chat API represents the same\n person as the `123456789` Person profile ID in People API.\n\n - the `id` for a\n [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users)\n in the Admin SDK Directory API.\n\n - the user's email address can be used as an alias for `{user}` in API\n requests. For example, if the People API Person profile ID for\n `user@example.com` is `123456789`, you can use `users/user@example.com` as\n an alias to reference `users/123456789`. Only the canonical resource name\n (for example `users/123456789`) will be returned from the API.\n\n### #type\n\n def type() -\u003e ::Google::Apps::Chat::V1::User::Type\n\n**Returns**\n\n- ([::Google::Apps::Chat::V1::User::Type](./Google-Apps-Chat-V1-User-Type)) --- User type.\n\n### #type=\n\n def type=(value) -\u003e ::Google::Apps::Chat::V1::User::Type\n\n**Parameter**\n\n- **value** ([::Google::Apps::Chat::V1::User::Type](./Google-Apps-Chat-V1-User-Type)) --- User type. \n**Returns**\n\n- ([::Google::Apps::Chat::V1::User::Type](./Google-Apps-Chat-V1-User-Type)) --- User type."]]