Method: spaces.get
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Restituisce i dettagli di uno spazio. Per un esempio, vedi Visualizzare i dettagli di uno spazio.
Supporta i seguenti tipi di autenticazione:
L'autenticazione delle app presenta le seguenti limitazioni:
space.access_settings
viene compilato solo quando si utilizza l'ambito chat.app.spaces
.
space.predefind_permission_settings
e space.permission_settings
vengono compilati solo quando si utilizza l'ambito chat.app.spaces
e solo per gli spazi creati dall'app.
Richiesta HTTP
GET https://chat.googleapis.com/v1/{name=spaces/*}
L'URL utilizza la sintassi di transcodifica gRPC.
Parametri del percorso
Parametri |
name |
string
Obbligatorio. Nome della risorsa dello spazio, nel formato spaces/{space} . Formato: spaces/{space}
|
Parametri di query
Parametri |
useAdminAccess |
boolean
Facoltativo. Se true , il metodo viene eseguito utilizzando i privilegi di amministratore di Google Workspace dell'utente. L'utente che effettua la chiamata deve essere un amministratore di Google Workspace con il privilegio Gestisci spazi e conversazioni di Chat. Richiede gli ambiti OAuth 2.0 chat.admin.spaces o chat.admin.spaces.readonly .
|
Corpo della richiesta
Il corpo della richiesta deve essere vuoto.
Corpo della risposta
In caso di esito positivo, il corpo della risposta contiene un'istanza di Space
.
Ambiti di autorizzazione
Richiede uno dei seguenti ambiti OAuth:
https://www.googleapis.com/auth/chat.admin.spaces
https://www.googleapis.com/auth/chat.admin.spaces.readonly
https://www.googleapis.com/auth/chat.spaces
https://www.googleapis.com/auth/chat.spaces.readonly
https://www.googleapis.com/auth/chat.bot
https://www.googleapis.com/auth/chat.app.spaces
Per ulteriori informazioni, consulta la Guida all'autorizzazione.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-25 UTC.
[null,null,["Ultimo aggiornamento 2025-07-25 UTC."],[[["\u003cp\u003eReturns detailed information about a Google Chat space, including its properties and settings.\u003c/p\u003e\n"],["\u003cp\u003eRequires a specific HTTP request structure using the space's resource name as a path parameter.\u003c/p\u003e\n"],["\u003cp\u003eOffers optional use of administrator privileges via a query parameter for authorized users.\u003c/p\u003e\n"],["\u003cp\u003eSupports various authentication methods, including app and user authentication with specific OAuth scopes for authorization.\u003c/p\u003e\n"],["\u003cp\u003eProvides a comprehensive response containing details about the space upon successful execution.\u003c/p\u003e\n"]]],["This describes retrieving details about a space using a `GET` request to `https://chat.googleapis.com/v1/{name=spaces/*}`. The space's resource name is a required path parameter. Optional `useAdminAccess` query parameter allows execution with admin privileges. The request body is empty. A successful response returns a Space object. Authentication requires specific OAuth scopes, and it supports both App and User authentication, including admin access. The request also contains an ability to test the request directly.\n"],null,["# Method: spaces.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 space. For an example, see [Get details about a space](https://developers.google.com/workspace/chat/get-spaces).\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.spaces` with [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.spaces.readonly`\n - `https://www.googleapis.com/auth/chat.spaces`\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.spaces.readonly`\n - `https://www.googleapis.com/auth/chat.admin.spaces`\n\nApp authentication has the following limitations:\n\n- `space.access_settings` is only populated when using the `chat.app.spaces` scope.\n- `space.predefind_permission_settings` and `space.permission_settings` are only populated when using the `chat.app.spaces` scope, and only for spaces the app created.\n\n### HTTP request\n\n`GET https://chat.googleapis.com/v1/{name=spaces/*}`\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 space, in the form `spaces/{space}`. Format: `spaces/{space}` |\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.spaces` or `chat.admin.spaces.readonly` [OAuth 2.0 scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). |\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 [Space](/workspace/chat/api/reference/rest/v1/spaces#Space).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/chat.admin.spaces`\n- `https://www.googleapis.com/auth/chat.admin.spaces.readonly`\n- `https://www.googleapis.com/auth/chat.spaces`\n- `https://www.googleapis.com/auth/chat.spaces.readonly`\n- `https://www.googleapis.com/auth/chat.bot`\n- `https://www.googleapis.com/auth/chat.app.spaces`\n\nFor more information, see the [Authorization guide](/workspace/chat/authenticate-authorize)."]]