更新会员资格。如需查看示例,请参阅更新用户在聊天室中的成员身份。
支持以下类型的身份验证:
-
https://www.googleapis.com/auth/chat.app.memberships
(仅限应用创建的聊天室)
使用以下授权范围之一进行用户身份验证:
https://www.googleapis.com/auth/chat.memberships
https://www.googleapis.com/auth/chat.import
(仅限“导入模式聊天室”)- 当管理员账号通过身份验证时,用户身份验证会授予管理员权限,
useAdminAccess
为true
,并使用以下授权范围:https://www.googleapis.com/auth/chat.admin.memberships
HTTP 请求
PATCH https://chat.googleapis.com/v1/{membership.name=spaces/*/members/*}
网址采用 gRPC 转码语法。
路径参数
参数 | |
---|---|
membership.name |
标识符。由服务器分配的会员资格的资源名称。 格式: |
查询参数
参数 | |
---|---|
updateMask |
必需。要更新的字段路径。使用英文逗号分隔多个值,或使用 目前支持的字段路径:
|
useAdminAccess |
可选。如果值为 调用用户必须是拥有“管理聊天和聊天室对话”权限的 Google Workspace 管理员。 需要 |
请求正文
请求正文包含一个 Membership
实例。
响应正文
如果成功,则响应正文包含一个 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
如需了解详情,请参阅授权指南。