4.3 消息发送接口(传入参数实现对群体发送消息)

4.4.1 请求方式

POST

4.4.2 接口URL(提供http以及https,根据实际情况选其一)

http连接:http://10.150.11.22:8281/weichat/v1.0/mpTemplateMessage/sendMessage
https连接:https://10.150.11.22:8244/weichat/v1.0/mpTemplateMessage/sendMessage

4.4.3 接口参数

Header参数:

参数名称 参数类型 是否可为空 说明
Authorization String N 参数值为: “Bearer”+token
其中token为接口4.2中返回的access_token

Body参数:

参数名称 参数类型 是否可为空 说明
msgType String N 消息类型(请选择以下值):
WECHAT 微信
SMS 短信
senderName String N 发送者名字:
系统名
用户名
senderId String N 发送者id:
系统id
用户账号
recipientInfo String N 接收者类型:
部门编码
用户账号(教师教工号or学生学号)
电话号码集合(逗号分隔的字符串:”1393434392, 1393434392”)
type String N 接收者集合(请选择以下值-单选):
部门集合:1
账号集合:2
电话号码集合:3
content json N 消息主体(json字符串)
template String N 模板id
userTypes String N 接收者类型(请选择一下值-可多选):
管理员:1
学生:2
教师:3
兼职教师:4
新生:5
如需要发送给教师及兼职教师:(请以,分割),如:3,4

4.4.4 截图

4.4.5 返回结果说明

result:0,表示获取数据失败,1,表示获取数据成功

msg:描述信息,若出现异常,则msg返回异常信息

data:Tasked:任务处理id

示例:

{
  "result": 1,
  "msg": "消息发送成功",
  "data": {“taskid”:”xxxx”}
}

results matching ""

    No results matching ""