Appearance
获取群发规则
查询当前企业的群发规则:每位客户、每个客户群可以接收几条群发。
请求参数
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
appid | 是 | string | 实例 appid,标识操作哪个已登录账号。示例:we_xxxxxxxxxxxxxxx |
请求示例
http
POST {BASE_URL}/api/message/groupSendRuleGet
Authorization: Bearer <你的调用凭证>
Content-Type: application/json
{
"appid": "we_xxxxxxxxxxxxxxx"
}1
2
3
4
5
6
7
2
3
4
5
6
7
bash
curl -X POST '{BASE_URL}/api/message/groupSendRuleGet' \
-H 'Authorization: Bearer <你的调用凭证>' \
-H 'Content-Type: application/json' \
--data-raw '{
"appid": "we_xxxxxxxxxxxxxxx"
}'1
2
3
4
5
6
2
3
4
5
6
python
import requests
url = "{BASE_URL}/api/message/groupSendRuleGet"
headers = {"Authorization": "Bearer <你的调用凭证>", "Content-Type": "application/json"}
body = """{
"appid": "we_xxxxxxxxxxxxxxx"
}"""
resp = requests.post(url, headers=headers, data=body.encode("utf-8"))
print(resp.text)1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String url = "{BASE_URL}/api/message/groupSendRuleGet";
String body = "{\n" +
" \"appid\": \"we_xxxxxxxxxxxxxxx\"\n" +
"}";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder(URI.create(url))
.header("Authorization", "Bearer <你的调用凭证>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
php
<?php
$url = '{BASE_URL}/api/message/groupSendRuleGet';
$body = <<<'JSON'
{
"appid": "we_xxxxxxxxxxxxxxx"
}
JSON;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer <你的调用凭证>',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
响应示例
json
{
"code": 0,
"data": {
"personGroupSend": {
"groupSendWording": "每位客户每天可接收1条群发消息"
},
"roomGroupSend": {
"groupSendWording": "每个客户群每天可接收1条群发消息"
},
"officialPersonGroupSend": {
"groupSendWording": "每位客户每月只能收到企业的1条消息",
"limit": 1
},
"officialRoomGroupSend": {
"groupSendWording": "每个客户群每个月只能收到企业的1条消息",
"limit": 1
},
"roomGroupSendBatchLimit": {
"limit": 2000
},
"newGroupSendLimit": {
"bOpen": true,
"singleGroupSendCreateWording": "每位客户每天可接收1条群发消息",
"singleGroupSendIntroWording": "每位客户每天可接收1条群发消息,不限为企业发布的群发还是个人发布的群发。",
"roomGroupSendCreateWording": "每个客户群每天可接收1条群发消息",
"roomGroupSendIntroWording": "每个客户群每天可接收1条群发消息,不限为企业发布的群发还是个人发布的群发。",
"roomGroupSendChooseWording": "当日还可接收群发消息的客户群",
"combineWording": "每位客户/每个客户群每天可接收1条群发消息",
"singleGroupSendChosseWording": "当日还可接收群发消息的客户",
"field10": "每位客户每月可最多接收群发消息条数为当月天数。<br>企业管理员可以在手机上「工作台-群发助手-右上角...应用详情-群发规则」里灵活选择按日、按周、按月配置。",
"field11": "每个客户群每月可最多接收群发消息条数为当月天数。<br>企业管理员可以在手机上「工作台-群发助手-右上角...应用详情-群发规则」里灵活选择按日、按周、按月配置。"
}
},
"detail": "",
"message": "ok",
"time": "2026-11-10 18:06:10"
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
响应字段
响应字段(19 项)
| 字段 | 类型 | 说明 |
|---|---|---|
code | int64 | 统一封套状态码:0=成功,负数=失败 |
data | object | 群发规则 |
data.personGroupSend | object | 客户的群发规则 |
data.personGroupSend.groupSendWording | string | 规则文案,直接展示即可 |
data.roomGroupSend | object | 客户群的群发规则 |
data.roomGroupSend.groupSendWording | string | 规则文案,直接展示即可 |
data.officialPersonGroupSend | object | 企业统一群发到客户的规则 |
data.officialPersonGroupSend.groupSendWording | string | 规则文案 |
data.officialPersonGroupSend.limit | int64 | 每月可接收条数 |
data.officialRoomGroupSend | object | 企业统一群发到客户群的规则 |
data.officialRoomGroupSend.groupSendWording | string | 规则文案 |
data.officialRoomGroupSend.limit | int64 | 每月可接收条数 |
data.roomGroupSendBatchLimit | object | 群发到客户群的数量上限 |
data.roomGroupSendBatchLimit.limit | int64 | 一次群发最多可选的客户群数 |
data.newGroupSendLimit | object | 新版群发规则;除 bOpen 外都是各场景的提示文案(字段名以 Wording 结尾),文案里可能带 <br>,展示前按 HTML 处理 |
data.newGroupSendLimit.bOpen | boolean | 是否启用新版群发规则;启用后每天可接收几条只写在文案里,没有单独的数字字段 |
detail | string | 附加明细,通常为空 |
message | string | 文案:成功为 ok;失败形如 -码|描述 |
time | string | 服务端处理时间 YYYY-MM-DD HH:MM:SS |