Method: spaces.members.get
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Żądanie HTTP
GET https://chat.googleapis.com/v1/{name=spaces/*/members/*}
Adres URL używa składni transkodowania gRPC.
Parametry ścieżki
Parametry |
name |
string
Wymagane. Nazwa zasobu uczestnictwa do pobrania. Aby uzyskać własne członkostwo w aplikacji za pomocą uwierzytelniania użytkownika, możesz opcjonalnie użyć spaces/{space}/members/app . Format: spaces/{space}/members/{member} lub spaces/{space}/members/app Możesz użyć adresu e-mail użytkownika jako aliasu dla adresu {member} . Na przykład spaces/{space}/members/example@gmail.com , gdzie example@gmail.com to adres e-mail użytkownika Google Chat.
|
Parametry zapytania
Parametry |
useAdminAccess |
boolean
Opcjonalnie. Gdy true , metoda jest wykonywana z użyciem uprawnień administratora Google Workspace użytkownika. Użytkownik dzwoniący musi być administratorem Google Workspace z uprawnieniami do zarządzania czatem i rozmowami w pokoju. Wymaga chat.admin.memberships lub chat.admin.memberships.readonly zakresów OAuth 2.0. Uzyskiwanie członkostwa w aplikacjach w przestrzeni nie jest obsługiwane w przypadku korzystania z dostępu administratora.
|
Treść żądania
Treść żądania musi być pusta.
Treść odpowiedzi
W przypadku powodzenia treść odpowiedzi obejmuje wystąpienie elementu Membership
.
Zakresy autoryzacji
Wymaga jednego z tych zakresów 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
Więcej informacji znajdziesz w przewodniku po autoryzacji.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-25 UTC.
[null,null,["Ostatnia aktualizacja: 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)."]]