发送消息
接口地址
[接口服务器地址]/api/im/user.html
请求方法
POST
Request URL
| 名称 | 必选 | 说明 |
|---|
Request Body
| 名称 | 必选 | 类型 | 说明 |
|---|---|---|---|
| sender | true | string | 发送者ID |
| recver | true | string | 接收者 用户:json格式 [{"id":"100","name":"test1","type":"u"}] type: u 用户 d 部门 o 组织 t 标签 |
| subject | false | string | 标题 为空时会截取content内容 |
| msg_type | true | string | 消息类型 text,image,file,voice,shoot,location,app,link |
| content | false | string | 内容 <a href='/docs/integrate/sendmsg.html' target='_blank'>查看消息内容格式说明</a> |
| file | false | file | 文件 当消息类型时 file,image,voice,shoot时,可以由file自动生成content,content为空 |
| content_type | false | string | 内容类型 文本:Text/Btf |
| msgexttype | false | string | 消息的扩展类型 可用来消息分类 如 schedule |
| extdata | false | string | 扩展数据 |
调用样例及调试工具
测试接口返回结果(成功)
{"status":1,"code":"0","msg":"","data":[]}
注意事项
recver.type 默认u , u:用户 o:组织 g:表示群组 t:标签