Method: spaces.members.delete

刪除會員資格。如需範例,請參閱「從聊天室中移除使用者或 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 (僅限匯入模式聊天室)
    • 當管理員帳戶進行驗證、useAdminAccesstrue,且使用下列授權範圍時,使用者驗證會授予管理員權限:
      • https://www.googleapis.com/auth/chat.admin.memberships

如要刪除聊天室管理員的會籍,要求者必須是聊天室管理員。如果您使用應用程式驗證,應用程式必須是聊天室建立者。

HTTP 要求

DELETE https://chat.googleapis.com/v1/{name=spaces/*/members/*}

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
name

string

必要欄位。要刪除的會員資格的資源名稱。聊天應用程式可以刪除使用者或自己的會員資格。即時通訊應用程式無法刪除其他應用程式的會員資格。

刪除真人會員時,需要使用 chat.memberships 範圍搭配使用者驗證,或是使用 chat.memberships.app 範圍搭配應用程式驗證spaces/{space}/members/{member} 格式。您可以使用電子郵件做為 {member} 的別名。例如 spaces/{space}/members/example@gmail.com,其中 example@gmail.com 是 Google Chat 使用者的電子郵件地址。

刪除應用程式會員資格時,需要 chat.memberships.app 範圍和 spaces/{space}/members/app 格式。

格式:spaces/{space}/members/{member}spaces/{space}/members/app

查詢參數

參數
useAdminAccess

boolean

(非必要) 當 true 時,方法會使用使用者的 Google Workspace 管理員權限執行。

撥打電話的使用者必須是具備「管理即時通訊和聊天室對話」權限的 Google Workspace 管理員。

需要 chat.admin.memberships OAuth 2.0 範圍

管理員存取權不支援刪除聊天室中的應用程式成員資格。

要求主體

要求主體必須為空白。

回應主體

如果成功,回應主體會包含 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

詳情請參閱授權指南