API DocsAPI Docs
delete/api/group/{groupId}/member/{userId}
delete/api/group/{groupId}/member/{userId}
移除小组成员
Basic Information
Request Method:
delete
Request URL:
https://www.lycoo.com/api/group/{groupId}/member/{userId}
Tags:
小组成员管理
Description
从小组中移除指定成员。有以下两种使用场景:
用途:
- 管理员移除小组成员(需要管理员权限)
- 成员自己退出小组(用户ID与当前登录用户一致时)
权限要求:
- 如果当前登录用户是小组管理员(owner或admin),可以移除任何成员(除了owner)
- 用户可以移除自己(退出小组)
- 无法移除小组创建者(owner)
Path Parameters
Path Parameters Explanation
Path parameters are variables in the URL path, for example:
https://www.lycoo.com/api/group/:groupId/member/:userId
Parameter Name | Type | Required | Example Value | Description |
---|---|---|---|---|
groupId | string | Required | example | 小组ID |
userId | string | Required | example | 要移除的用户ID |
Header Parameters
Header Parameters Explanation
Header parameters are used to pass additional information, such as authentication credentials, content type, etc.
Parameter Name | Type | Required | Example Value | Description |
---|---|---|---|---|
Authorization | string | Required | Bearer sha_1234567890abcdef... | The authentication header is used to verify the identity of API requests, containing an access token Format: Bearer {token} |
Response Example
200成员移除成功
{
"success": true,
"message": "成员已成功移除"
}
401
403权限不足
{
"success": false,
"message": "您没有权限管理小组成员或无法移除小组拥有者"
}
404小组或成员不存在
{
"success": false,
"message": "小组不存在或成员不存在"
}
500