User
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Google Chat इस्तेमाल करने वाला कोई व्यक्ति. अगर अनुरोध के आउटपुट के तौर पर दिखाया जाता है और आपका Chat ऐप्लिकेशन उपयोगकर्ता के तौर पर पुष्टि करता है, तो User
संसाधन के आउटपुट में उपयोगकर्ता के name
और type
की जानकारी ही अपने-आप भर जाती है.
JSON के काेड में दिखाना |
{
"name": string,
"displayName": string,
"domainId": string,
"type": enum (Type ),
"isAnonymous": boolean
} |
फ़ील्ड |
name |
string
Google Chat user के लिए संसाधन का नाम. फ़ॉर्मैट: users/{user} . users/app का इस्तेमाल, कॉलिंग ऐप्लिकेशन bot के उपयोगकर्ता के लिए उपनाम के तौर पर किया जा सकता है. human users के लिए, {user} और ये उपयोगकर्ता आइडेंटिफ़ायर एक ही हैं:
People API में, Person के लिए id . उदाहरण के लिए, Chat API में users/123456789 , People API में 123456789 व्यक्ति प्रोफ़ाइल आईडी के तौर पर उसी व्यक्ति को दिखाता है.
Admin SDK Directory API में किसी उपयोगकर्ता के लिए id .
उपयोगकर्ता के ईमेल पते का इस्तेमाल, एपीआई अनुरोधों में {user} के लिए उपनाम के तौर पर किया जा सकता है. उदाहरण के लिए, अगर user@example.com के लिए People API पर्सोनी की प्रोफ़ाइल का आईडी 123456789 है, तो users/123456789 का रेफ़रंस देने के लिए users/user@example.com का इस्तेमाल उपनाम के तौर पर किया जा सकता है. एपीआई से सिर्फ़ कैननिकल रिसॉर्स का नाम दिखाया जाएगा. उदाहरण के लिए, users/123456789 .
|
displayName |
string
सिर्फ़ आउटपुट के लिए. उपयोगकर्ता का डिसप्ले नेम.
|
domainId |
string
उपयोगकर्ता के Google Workspace डोमेन का यूनीक आइडेंटिफ़ायर.
|
type |
enum (Type )
उपयोगकर्ता का टाइप.
|
isAnonymous |
boolean
सिर्फ़ आउटपुट के लिए. true पर, उपयोगकर्ता को मिटा दिया जाता है या उसकी प्रोफ़ाइल नहीं दिखती है.
|
टाइप
Enums |
TYPE_UNSPECIFIED |
Enum के लिए डिफ़ॉल्ट वैल्यू. इसका इस्तेमाल न करें. |
HUMAN |
उपयोगकर्ता. |
BOT |
Chat ऐप्लिकेशन का उपयोगकर्ता. |
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThe \u003ccode\u003eUser\u003c/code\u003e resource represents a Google Chat user, which can be a human or a Chat app.\u003c/p\u003e\n"],["\u003cp\u003eA user's resource name is formatted as \u003ccode\u003eusers/{user}\u003c/code\u003e, with various identifiers like email or People API ID usable for \u003ccode\u003e{user}\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eWhen a Chat app authenticates as a user, the API response for the \u003ccode\u003eUser\u003c/code\u003e resource only includes the \u003ccode\u003ename\u003c/code\u003e and \u003ccode\u003etype\u003c/code\u003e fields.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003etype\u003c/code\u003e field indicates whether the user is \u003ccode\u003eHUMAN\u003c/code\u003e or \u003ccode\u003eBOT\u003c/code\u003e, while \u003ccode\u003eisAnonymous\u003c/code\u003e signifies a deleted or invisible profile.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edisplayName\u003c/code\u003e and \u003ccode\u003edomainId\u003c/code\u003e provide additional user information but might not be populated in all contexts.\u003c/p\u003e\n"]]],["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"],null,["# User\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [Type](#Type)\n\nA user in Google Chat. When returned as an output from a request, if your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the output for a `User` resource only populates the user's `name` and `type`.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"displayName\": string, \"domainId\": string, \"type\": enum (/workspace/chat/api/reference/rest/v1/User#Type), \"isAnonymous\": boolean } ``` |\n\n| Fields ||\n|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Resource name for a Google Chat [user](/workspace/chat/api/reference/rest/v1/User). Format: `users/{user}`. `users/app` can be used as an alias for the calling app [bot](/workspace/chat/api/reference/rest/v1/User#Type.ENUM_VALUES.BOT) user. For [human users](/workspace/chat/api/reference/rest/v1/User#Type.ENUM_VALUES.HUMAN), `{user}` is the same user identifier as: - the `id` for the [Person](https://developers.google.com/people/api/rest/v1/people) in the People API. For example, `users/123456789` in Chat API represents the same person as the `123456789` Person profile ID in People API. - the `id` for a [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) 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 for `user@example.com` is `123456789`, you can use `users/user@example.com` as an alias to reference `users/123456789`. Only the canonical resource name (for example `users/123456789`) will be returned from the API. |\n| `displayName` | `string` Output only. The user's display name. |\n| `domainId` | `string` Unique identifier of the user's Google Workspace domain. |\n| `type` | `enum (`[Type](/workspace/chat/api/reference/rest/v1/User#Type)`)` User type. |\n| `isAnonymous` | `boolean` Output only. When `true`, the user is deleted or their profile is not visible. |\n\nType\n----\n\n| Enums ||\n|--------------------|-----------------------------------------|\n| `TYPE_UNSPECIFIED` | Default value for the enum. DO NOT USE. |\n| `HUMAN` | Human user. |\n| `BOT` | Chat app user. |"]]