删除会员资格。如需查看示例,请参阅从聊天室中移除用户或 Google Chat 应用。
支持以下类型的身份验证:
-
https://www.googleapis.com/auth/chat.app.memberships
使用以下授权范围之一进行用户身份验证:
https://www.googleapis.com/auth/chat.memberships
https://www.googleapis.com/auth/chat.memberships.app
(从聊天室中移除通话应用)https://www.googleapis.com/auth/chat.import
(仅限“导入模式聊天室”)- 当管理员账号通过身份验证时,用户身份验证会授予管理员权限,
useAdminAccess
为true
,并使用以下授权范围:https://www.googleapis.com/auth/chat.admin.memberships
应用身份验证不支持以下使用情形:
- 从聊天室中移除 Google 群组。
- 从聊天室中移除 Chat 应用。
如需删除聊天室管理员的成员身份,请求者必须是聊天室管理员。如果您使用的是应用身份验证,则 Chat 应用必须是聊天室创建者。
HTTP 请求
DELETE https://chat.googleapis.com/v1/{name=spaces/*/members/*}
网址采用 gRPC 转码语法。
路径参数
参数 | |
---|---|
name |
必需。要删除的会员资格的资源名称。聊天应用可以删除人类用户或其自身的会员资格。聊天应用无法删除其他应用的会员资格。 删除人员成员身份时,需要 删除应用会员资格时,需要 格式: |
查询参数
参数 | |
---|---|
useAdminAccess |
可选。如果值为 调用用户必须是拥有“管理聊天和聊天室对话”权限的 Google Workspace 管理员。 需要 不支持使用管理员访问权限删除聊天室中的应用成员。 |
请求正文
请求正文必须为空。
响应正文
如果成功,则响应正文包含一个 Membership
实例。
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/chat.app.memberships
https://www.googleapis.com/auth/chat.admin.memberships
https://www.googleapis.com/auth/chat.import
https://www.googleapis.com/auth/chat.memberships
https://www.googleapis.com/auth/chat.memberships.app
如需了解详情,请参阅授权指南。