Skip to main content

功能说明

开发者在服务端系统通知消息,适用于 官方号系统通知类 的功能。

请求说明

请求鉴权:接口需要增加验证 Header,请查看 鉴权说明

请求类型POST

请求限频100次/秒

请求地址:https://请求域名/apigateway/messages/system/send

Content-Typeapplication/json

请求参数

参数数据类型是否必填参数说明
sender_idstring消息发送者id
target_idsarray消息接收者id列表
msg_typestring消息类型标识
msg_contentstring消息内容,建议json格式
is_storagebool设置该消息是否存储到历史消息里面,默认 true
is_countbool设置该消息是否记录未读数,默认true,记入未读数
is_statebool状态消息,该消息有极高的发送性能,但不保证可靠

请求示例

POST /apigateway/messages/system/send HTTP/1.1
appkey: appkey
signature: 2e639ae3600a4sdff61fb88b76f485b
nonce: nonce
timestamp: 1672568121910
Content-Type: application/json

{
"sender_id":"sys1",
"target_ids":["userid1","userid2"],
"msg_type":"text",
"msg_content":"{\"content\":\"aabbcc\"}",
"is_storage":true,
"is_state":false
}

响应参数

参数数据类型参数说明
msg_idstring消息的唯一标识

响应示例

{
"code":0,
"msg":"sucess",
"data":[
{
"target_id":"userid1",
"msg_id":"aaaaaaa"
},
{
"target_id":"userid2",
"msg_id":"bbbbbbb"
}
]
}