Method: spaces.members.get
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
בקשת HTTP
GET https://chat.googleapis.com/v1/{name=spaces/*/members/*}
כתובת ה-URL משתמשת בתחביר של gRPC Transcoding.
פרמטרים של נתיב
פרמטרים |
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 עם הרשאה לניהול צ'אטים ושיחות במרחבים. נדרשים היקפי ההרשאות של OAuth 2.0 chat.admin.memberships או chat.admin.memberships.readonly . אי אפשר לקבל את חברות האפליקציה במרחב כשמשתמשים בגישת אדמין.
|
גוף הבקשה
גוף הבקשה צריך להיות ריק.
גוף התשובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכיל מופע של 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 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 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)."]]