Method: spaces.members.get
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
यह फ़ंक्शन, सदस्यता के बारे में जानकारी दिखाता है. उदाहरण के लिए, किसी उपयोगकर्ता या Google Chat ऐप्लिकेशन की सदस्यता के बारे में जानकारी पाना लेख पढ़ें.
इन तरह के authentication के साथ काम करता है:
ऐप्लिकेशन की पुष्टि, अनुमति के इन स्कोप में से किसी एक के साथ की गई हो:
https://www.googleapis.com/auth/chat.bot
https://www.googleapis.com/auth/chat.app.memberships
(इसके लिए, एडमिन की अनुमति ज़रूरी है)
उपयोगकर्ता की पुष्टि के लिए, अनुमति के इन स्कोप में से किसी एक का इस्तेमाल करें:
https://www.googleapis.com/auth/chat.memberships.readonly
https://www.googleapis.com/auth/chat.memberships
- उपयोगकर्ता की पुष्टि करने से, एडमिन को एडमिन के अधिकार मिलते हैं. ऐसा तब होता है, जब एडमिन खाता पुष्टि करता है,
useAdminAccess
true
होता है, और इनमें से किसी एक अनुमति के दायरे का इस्तेमाल किया जाता है:
https://www.googleapis.com/auth/chat.admin.memberships.readonly
https://www.googleapis.com/auth/chat.admin.memberships
एचटीटीपी अनुरोध
GET https://chat.googleapis.com/v1/{name=spaces/*/members/*}
यह यूआरएल, gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
पाथ पैरामीटर
पैरामीटर |
name |
string
ज़रूरी है. सदस्यता का संसाधन नाम, जिसे वापस पाना है. उपयोगकर्ता की पुष्टि करने की सुविधा का इस्तेमाल करके, ऐप्लिकेशन की सदस्यता पाने के लिए, spaces/{space}/members/app का इस्तेमाल किया जा सकता है. फ़ॉर्मैट: spaces/{space}/members/{member} या spaces/{space}/members/app उपयोगकर्ता के ईमेल को {member} के लिए उपनाम के तौर पर इस्तेमाल किया जा सकता है. उदाहरण के लिए, spaces/{space}/members/example@gmail.com , जहां example@gmail.com , Google Chat इस्तेमाल करने वाले व्यक्ति का ईमेल पता है.
|
क्वेरी पैरामीटर
पैरामीटर |
useAdminAccess |
boolean
ज़रूरी नहीं. true होने पर, यह तरीका उपयोगकर्ता के Google Workspace एडमिन के अधिकारों का इस्तेमाल करके काम करता है. कॉल करने वाला व्यक्ति, Google Workspace एडमिन होना चाहिए. साथ ही, उसके पास चैट और स्पेस में होने वाली बातचीत को मैनेज करने का अधिकार होना चाहिए. इसके लिए, chat.admin.memberships या chat.admin.memberships.readonly OAuth 2.0 स्कोप की ज़रूरत होती है. एडमिन के तौर पर ऐक्सेस करने पर, किसी स्पेस में ऐप्लिकेशन की सदस्यताएं नहीं ली जा सकतीं.
|
अनुरोध का मुख्य भाग
अनुरोध का मुख्य हिस्सा खाली होना चाहिए.
जवाब का मुख्य हिस्सा
कामयाब रहने पर, जवाब के मुख्य हिस्से में Membership
का एक इंस्टेंस शामिल किया जाता है.
अनुमति के स्कोप
इसके लिए, इनमें से किसी एक OAuth स्कोप की ज़रूरत होती है:
https://www.googleapis.com/auth/chat.admin.memberships
https://www.googleapis.com/auth/chat.admin.memberships.readonly
https://www.googleapis.com/auth/chat.app.memberships
https://www.googleapis.com/auth/chat.bot
https://www.googleapis.com/auth/chat.memberships
https://www.googleapis.com/auth/chat.memberships.readonly
ज़्यादा जानकारी के लिए, अनुमति पाने से जुड़ी गाइड देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को 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\u003eReturns detailed information about a specific Google Chat membership within a space.\u003c/p\u003e\n"],["\u003cp\u003eSupports both app and user authentication, with an option for user authentication to leverage administrator privileges.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing the membership's resource name in the request path, allowing the use of email aliases for member identification.\u003c/p\u003e\n"],["\u003cp\u003eOptionally accepts a query parameter to utilize the user's Google Workspace administrator privileges for the request.\u003c/p\u003e\n"],["\u003cp\u003eNeeds authorization with specific OAuth scopes related to Chat memberships and administration.\u003c/p\u003e\n"]]],["This document outlines how to retrieve membership details using a `GET` request to `https://chat.googleapis.com/v1/{name=spaces/*/members/*}`. The `name` path parameter specifies the membership, with options to use a user's email as an alias. The `useAdminAccess` query parameter allows for execution with Google Workspace administrator privileges. The request body should be empty; a successful response contains a `Membership` instance. The operation requires various authorization scopes, including `chat.admin.memberships`.\n"],null,["# Method: spaces.members.get\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nReturns details about a membership. For an example, see [Get details about a user's or Google Chat app's membership](https://developers.google.com/workspace/chat/get-members).\n\nSupports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):\n\n- [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with one of the following authorization scopes:\n\n - `https://www.googleapis.com/auth/chat.bot`\n - `https://www.googleapis.com/auth/chat.app.memberships` (requires [administrator approval](https://support.google.com/a?p=chat-app-auth))\n- [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes:\n\n - `https://www.googleapis.com/auth/chat.memberships.readonly`\n - `https://www.googleapis.com/auth/chat.memberships`\n - User authentication grants administrator privileges when an administrator account authenticates, `useAdminAccess` is `true`, and one of the following authorization scopes is used:\n - `https://www.googleapis.com/auth/chat.admin.memberships.readonly`\n - `https://www.googleapis.com/auth/chat.admin.memberships`\n\n### HTTP request\n\n`GET https://chat.googleapis.com/v1/{name=spaces/*/members/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. Resource name of the membership to retrieve. To get the app's own membership [by using user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), you can optionally use `spaces/{space}/members/app`. Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` You can use the user's email as an alias for `{member}`. For example, `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the email of the Google Chat user. |\n\n### Query parameters\n\n| Parameters ||\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `useAdminAccess` | `boolean` Optional. When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.memberships` or `chat.admin.memberships.readonly` [OAuth 2.0 scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Getting app memberships in a space isn't supported when using admin access. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [Membership](/workspace/chat/api/reference/rest/v1/spaces.members#Membership).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/chat.admin.memberships`\n- `https://www.googleapis.com/auth/chat.admin.memberships.readonly`\n- `https://www.googleapis.com/auth/chat.app.memberships`\n- `https://www.googleapis.com/auth/chat.bot`\n- `https://www.googleapis.com/auth/chat.memberships`\n- `https://www.googleapis.com/auth/chat.memberships.readonly`\n\nFor more information, see the [Authorization guide](/workspace/chat/authenticate-authorize)."]]