curl -X POST "http://localhost:5001/channel/subscriber_remove" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "group123",
"channel_type": 2,
"subscribers": ["user4", "user5"],
"temp_subscriber": 0
}'
const response = await fetch('http://localhost:5001/channel/subscriber_remove', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
channel_id: 'group123',
channel_type: 2,
subscribers: ['user4', 'user5'],
temp_subscriber: 0
})
});
const data = await response.json();
console.log(data);
import requests
data = {
"channel_id": "group123",
"channel_type": 2,
"subscribers": ["user4", "user5"],
"temp_subscriber": 0
}
response = requests.post('http://localhost:5001/channel/subscriber_remove', json=data)
result = response.json()
print(result)
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
data := map[string]interface{}{
"channel_id": "group123",
"channel_type": 2,
"subscribers": []string{"user4", "user5"},
"temp_subscriber": 0,
}
jsonData, _ := json.Marshal(data)
resp, err := http.Post(
"http://localhost:5001/channel/subscriber_remove",
"application/json",
bytes.NewBuffer(jsonData),
)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Printf("%+v\n", result)
}
{
"status": "ok"
}
Channel Management
Remove Channel Subscribers
Remove subscribers (members) from a channel
POST
/
channel
/
subscriber_remove
curl -X POST "http://localhost:5001/channel/subscriber_remove" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "group123",
"channel_type": 2,
"subscribers": ["user4", "user5"],
"temp_subscriber": 0
}'
const response = await fetch('http://localhost:5001/channel/subscriber_remove', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
channel_id: 'group123',
channel_type: 2,
subscribers: ['user4', 'user5'],
temp_subscriber: 0
})
});
const data = await response.json();
console.log(data);
import requests
data = {
"channel_id": "group123",
"channel_type": 2,
"subscribers": ["user4", "user5"],
"temp_subscriber": 0
}
response = requests.post('http://localhost:5001/channel/subscriber_remove', json=data)
result = response.json()
print(result)
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
data := map[string]interface{}{
"channel_id": "group123",
"channel_type": 2,
"subscribers": []string{"user4", "user5"},
"temp_subscriber": 0,
}
jsonData, _ := json.Marshal(data)
resp, err := http.Post(
"http://localhost:5001/channel/subscriber_remove",
"application/json",
bytes.NewBuffer(jsonData),
)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Printf("%+v\n", result)
}
{
"status": "ok"
}
Overview
Remove subscribers (members) from a channel, supporting batch removal operations.Request Body
Required Parameters
string
required
Channel ID
integer
required
Channel type
1- Personal channel2- Group channel
Optional Parameters
integer
default:0
Whether as temporary subscriber
0- Permanent subscriber1- Temporary subscriber
curl -X POST "http://localhost:5001/channel/subscriber_remove" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "group123",
"channel_type": 2,
"subscribers": ["user4", "user5"],
"temp_subscriber": 0
}'
const response = await fetch('http://localhost:5001/channel/subscriber_remove', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
channel_id: 'group123',
channel_type: 2,
subscribers: ['user4', 'user5'],
temp_subscriber: 0
})
});
const data = await response.json();
console.log(data);
import requests
data = {
"channel_id": "group123",
"channel_type": 2,
"subscribers": ["user4", "user5"],
"temp_subscriber": 0
}
response = requests.post('http://localhost:5001/channel/subscriber_remove', json=data)
result = response.json()
print(result)
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
data := map[string]interface{}{
"channel_id": "group123",
"channel_type": 2,
"subscribers": []string{"user4", "user5"},
"temp_subscriber": 0,
}
jsonData, _ := json.Marshal(data)
resp, err := http.Post(
"http://localhost:5001/channel/subscriber_remove",
"application/json",
bytes.NewBuffer(jsonData),
)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Printf("%+v\n", result)
}
{
"status": "ok"
}
Response Fields
string
required
Operation status, returns
"ok" on successStatus Codes
| Status Code | Description |
|---|---|
| 200 | Subscribers removed successfully |
| 400 | Request parameter error |
| 403 | No operation permission |
| 404 | Channel does not exist or user not in channel |
| 500 | Internal server error |
Parameter Description
Temporary Subscriber (temp_subscriber)
| Value | Type | Description | Impact |
|---|---|---|---|
| 0 | Permanent subscriber | Remove official member | Completely remove member relationship |
| 1 | Temporary subscriber | Remove temporary member | Remove temporary access permission |
Use Cases
Group Management
- Kick members: Group owner or admin removes violating members
- Member leaves: User voluntarily leaves the group
- Batch cleanup: Clean up inactive or invalid members
⌘I

