Method: spaces.members.patch
HTTP 要求
PATCH https://chat.googleapis.com/v1/{membership.name=spaces/*/members/*}
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
membership.name |
string
ID。由伺服器指派的會員資源名稱。 格式:spaces/{space}/members/{member}
|
查詢參數
參數 |
updateMask |
string (FieldMask format)
必要欄位。要更新的欄位路徑。請使用半形逗號分隔多個值,或使用 * 更新所有欄位路徑。 目前支援的欄位路徑:
|
useAdminAccess |
boolean
選用設定。當 true 時,方法會使用使用者的 Google Workspace 管理員權限執行。 撥打電話的使用者必須是具備「管理即時通訊和聊天室對話」權限的 Google Workspace 管理員。 需要 chat.admin.memberships OAuth 2.0 範圍。
|
要求主體
要求主體包含 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
詳情請參閱授權指南。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-02-27 (世界標準時間)。
[null,null,["上次更新時間:2025-02-27 (世界標準時間)。"],[[["This method updates a Google Chat membership, allowing you to modify aspects like user roles within a space."],["It supports both app and user authentication, with an option for administrator privileges using `useAdminAccess`."],["Requires specifying fields to update with `updateMask` and includes optional use of administrator privileges."],["You need appropriate OAuth scopes such as `chat.app.memberships` or `chat.admin.memberships` for authorization."]]],["This documentation details updating a membership via a `PATCH` HTTP request to `https://chat.googleapis.com/v1/{membership.name=spaces/*/members/*}`. Key actions include setting the `membership.name` path parameter and using the `updateMask` query parameter to specify fields for updating, such as `role`. Optionally, `useAdminAccess` can grant administrator privileges. The request body defines the new membership details, and the response body will contain updated membership information. Multiple authorization scopes are required.\n"]]