Method: spaces.members.delete
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
멤버십을 삭제합니다. 예를 보려면 스페이스에서 사용자 또는 Google Chat 앱 삭제하기를 참고하세요.
다음 유형의 인증을 지원합니다.
다음 사용 사례에서는 앱 인증이 지원되지 않습니다.
- 스페이스에서 Google 그룹을 삭제합니다.
- 스페이스에서 Chat 앱을 삭제합니다.
스페이스 관리자의 멤버십을 삭제하려면 요청자가 스페이스 관리자여야 합니다. 앱 인증을 사용하는 경우 Chat 앱이 스페이스 생성자여야 합니다.
HTTP 요청
DELETE https://chat.googleapis.com/v1/{name=spaces/*/members/*}
URL은 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
자세한 내용은 승인 가이드를 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-29(UTC)
[null,null,["최종 업데이트: 2025-07-29(UTC)"],[[["\u003cp\u003eDeletes a specified membership from a Google Chat space, allowing removal of human users or Chat apps.\u003c/p\u003e\n"],["\u003cp\u003eRequires specific OAuth scopes depending on the type of membership being deleted and whether admin privileges are used.\u003c/p\u003e\n"],["\u003cp\u003eSupports app and user authentication, with an option for administrator approval in Developer Preview for app authentication.\u003c/p\u003e\n"],["\u003cp\u003eUses a \u003ccode\u003eDELETE\u003c/code\u003e request with the membership's resource name specified in the path.\u003c/p\u003e\n"],["\u003cp\u003eProvides an optional \u003ccode\u003euseAdminAccess\u003c/code\u003e query parameter to utilize administrator privileges when deleting human memberships.\u003c/p\u003e\n"]]],["This API action deletes a membership using a `DELETE` request to `https://chat.googleapis.com/v1/{name=spaces/*/members/*}`. It requires specifying the membership's resource name in the `name` path parameter. Deleting human memberships requires the `chat.memberships` scope, while deleting app memberships requires the `chat.memberships.app` scope. Administrators can use `useAdminAccess` query parameter to operate with elevated privileges. The request body should be empty, and a successful response returns a `Membership` instance. Necessary authorization scopes include `chat.app.memberships`, `chat.admin.memberships`, `chat.import`, `chat.memberships`, and `chat.memberships.app`.\n"],null,["# Method: spaces.members.delete\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nDeletes a membership. For an example, see [Remove a user or a Google Chat app from a space](https://developers.google.com/workspace/chat/delete-members).\n\nSupports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):\n\n- [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) and the authorization scope:\n\n - `https://www.googleapis.com/auth/chat.app.memberships`\n- [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes:\n\n - `https://www.googleapis.com/auth/chat.memberships`\n - `https://www.googleapis.com/auth/chat.memberships.app` (to remove the calling app from the space)\n - `https://www.googleapis.com/auth/chat.import` (import mode spaces only)\n - User authentication grants administrator privileges when an administrator account authenticates, `useAdminAccess` is `true`, and the following authorization scope is used:\n - `https://www.googleapis.com/auth/chat.admin.memberships`\n\nApp authentication is not supported for the following use cases:\n\n- Removing a Google Group from a space.\n- Removing a Chat app from a space.\n\nTo delete memberships for space managers, the requester must be a space manager. If you're using [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) the Chat app must be the space creator.\n\n### HTTP request\n\n`DELETE https://chat.googleapis.com/v1/{name=spaces/*/members/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. Resource name of the membership to delete. Chat apps can delete human users' or their own memberships. Chat apps can't delete other apps' memberships. When deleting a human membership, requires the `chat.memberships` scope with [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) or the `chat.memberships.app` scope with [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and the `spaces/{space}/members/{member}` format. You can use the email as an alias for `{member}`. For example, `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the email of the Google Chat user. When deleting an app membership, requires the `chat.memberships.app` scope and `spaces/{space}/members/app` format. Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`. |\n\n### Query parameters\n\n| Parameters ||\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `useAdminAccess` | `boolean` Optional. When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Deleting app memberships in a space isn't supported using admin access. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [Membership](/workspace/chat/api/reference/rest/v1/spaces.members#Membership).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/chat.app.memberships`\n- `https://www.googleapis.com/auth/chat.admin.memberships`\n- `https://www.googleapis.com/auth/chat.import`\n- `https://www.googleapis.com/auth/chat.memberships`\n- `https://www.googleapis.com/auth/chat.memberships.app`\n\nFor more information, see the [Authorization guide](/workspace/chat/authenticate-authorize)."]]