curl -X POST "http://localhost:5001/channel/subscriber_add" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "group123",
"channel_type": 2,
"subscribers": ["user4", "user5", "user6"],
"reset": 0,
"temp_subscriber": 0
}'
const response = await fetch('http://localhost:5001/channel/subscriber_add', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
channel_id: 'group123',
channel_type: 2,
subscribers: ['user4', 'user5', 'user6'],
reset: 0,
temp_subscriber: 0
})
});
const data = await response.json();
console.log(data);
import requests
data = {
"channel_id": "group123",
"channel_type": 2,
"subscribers": ["user4", "user5", "user6"],
"reset": 0,
"temp_subscriber": 0
}
response = requests.post('http://localhost:5001/channel/subscriber_add', 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", "user6"},
"reset": 0,
"temp_subscriber": 0,
}
jsonData, _ := json.Marshal(data)
resp, err := http.Post(
"http://localhost:5001/channel/subscriber_add",
"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
Add Channel Subscribers
Add subscribers (members) to a channel
POST
/
channel
/
subscriber_add
curl -X POST "http://localhost:5001/channel/subscriber_add" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "group123",
"channel_type": 2,
"subscribers": ["user4", "user5", "user6"],
"reset": 0,
"temp_subscriber": 0
}'
const response = await fetch('http://localhost:5001/channel/subscriber_add', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
channel_id: 'group123',
channel_type: 2,
subscribers: ['user4', 'user5', 'user6'],
reset: 0,
temp_subscriber: 0
})
});
const data = await response.json();
console.log(data);
import requests
data = {
"channel_id": "group123",
"channel_type": 2,
"subscribers": ["user4", "user5", "user6"],
"reset": 0,
"temp_subscriber": 0
}
response = requests.post('http://localhost:5001/channel/subscriber_add', 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", "user6"},
"reset": 0,
"temp_subscriber": 0,
}
jsonData, _ := json.Marshal(data)
resp, err := http.Post(
"http://localhost:5001/channel/subscriber_add",
"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
Add subscribers (members) to a channel, supporting batch addition and reset mode.Request Body
Required Parameters
string
required
Channel ID
integer
required
Channel type
1- Personal channel2- Group channel
Optional Parameters
integer
default:0
Whether to reset existing subscribers
0- Do not reset, append new subscribers1- Reset, replace all existing subscribers
integer
default:0
Whether as temporary subscriber
0- Permanent subscriber1- Temporary subscriber
curl -X POST "http://localhost:5001/channel/subscriber_add" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "group123",
"channel_type": 2,
"subscribers": ["user4", "user5", "user6"],
"reset": 0,
"temp_subscriber": 0
}'
const response = await fetch('http://localhost:5001/channel/subscriber_add', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
channel_id: 'group123',
channel_type: 2,
subscribers: ['user4', 'user5', 'user6'],
reset: 0,
temp_subscriber: 0
})
});
const data = await response.json();
console.log(data);
import requests
data = {
"channel_id": "group123",
"channel_type": 2,
"subscribers": ["user4", "user5", "user6"],
"reset": 0,
"temp_subscriber": 0
}
response = requests.post('http://localhost:5001/channel/subscriber_add', 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", "user6"},
"reset": 0,
"temp_subscriber": 0,
}
jsonData, _ := json.Marshal(data)
resp, err := http.Post(
"http://localhost:5001/channel/subscriber_add",
"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 added successfully |
| 400 | Request parameter error |
| 403 | No operation permission |
| 404 | Channel does not exist |
| 500 | Internal server error |
Parameter Description
Reset Mode (reset)
| Value | Mode | Description | Use Case |
|---|---|---|---|
| 0 | Append mode | Add new members to existing members | Invite new members to join |
| 1 | Reset mode | Clear existing members, set as new member list | Rebuild group |
Temporary Subscriber (temp_subscriber)
| Value | Type | Features | Applicable Scenario |
|---|---|---|---|
| 0 | Permanent subscriber | Persistent member relationship | Official group members |
| 1 | Temporary subscriber | Temporary member relationship | Temporary visitors, meeting participants |
Use Cases
Group Management
- Invite new members: Group owner or admin invites new users to join the group
- Batch import: Batch import member lists from other platforms
- Rebuild group: Use reset mode to rebuild group members

