返回有关会员资格的详细信息。如需查看示例,请参阅获取有关用户或 Google Chat 应用会员资格的详细信息。
支持以下类型的身份验证:
应用身份验证,并具有以下授权范围之一:
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
HTTP 请求
GET https://chat.googleapis.com/v1/{name=spaces/*/members/*}
网址采用 gRPC 转码语法。
路径参数
参数 | |
---|---|
name |
必需。要检索的会员资格的资源名称。 如需通过用户身份验证获取应用自己的会员资格,您可以选择使用 格式: 您可以使用用户的电子邮件地址作为 |
查询参数
参数 | |
---|---|
useAdminAccess |
可选。如果值为 调用用户必须是拥有“管理聊天和聊天室对话”权限的 Google Workspace 管理员。 需要 使用管理员访问权限时,不支持获取空间中的应用会员资格。 |
请求正文
请求正文必须为空。
响应正文
如果成功,则响应正文包含一个 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
如需了解详情,请参阅授权指南。