Method: spaces.get
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
返回聊天室的详细信息。如需示例,请参阅获取聊天室的详细信息。
支持以下类型的身份验证:
应用身份验证,具有以下任一授权范围:
https://www.googleapis.com/auth/chat.bot
https://www.googleapis.com/auth/chat.app.spaces
(已获得管理员批准)
使用以下某个授权范围进行用户身份验证:
https://www.googleapis.com/auth/chat.spaces.readonly
https://www.googleapis.com/auth/chat.spaces
- 当管理员账号进行身份验证、
useAdminAccess
为 true
且使用以下授权范围之一时,用户身份验证会授予管理员权限:
https://www.googleapis.com/auth/chat.admin.spaces.readonly
https://www.googleapis.com/auth/chat.admin.spaces
应用身份验证具有以下限制:
- 仅在使用
chat.app.spaces
范围时才会填充 space.access_settings
。
- 只有在使用
chat.app.spaces
范围时,系统才会填充 space.predefind_permission_settings
和 space.permission_settings
,并且仅针对应用创建的聊天室。
HTTP 请求
GET https://chat.googleapis.com/v1/{name=spaces/*}
网址采用 gRPC 转码语法。
路径参数
参数 |
name |
string
必需。聊天室的资源名称,格式为 spaces/{space} 。 格式:spaces/{space}
|
查询参数
参数 |
useAdminAccess |
boolean
可选。如果为 true ,则该方法会使用用户的 Google Workspace 管理员权限运行。 发起通话的用户必须是拥有管理聊天和聊天室对话权限的 Google Workspace 管理员。 需要 chat.admin.spaces 或 chat.admin.spaces.readonly OAuth 2.0 范围。
|
响应正文
如果成功,则响应正文包含一个 Space
实例。
授权范围
需要以下 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
如需了解详情,请参阅授权指南。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\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)."]]