文档
测试

发送消息给用户

POST
http://visitor.daoben.tech/api/chat/sendUser

请求头

参数名
类型
描述
必填
token
string
token
必填

请求参数

参数名
类型
描述
必填
to_id
int
示例:2
必填
type
int
示例:1 //消息类型:1=文本,2=图片,3=语音
必填
content
string
示例:你好
必填

响应参数

参数名
类型
描述
必填
code
int
示例:1
必填
msg
string
示例:发送成功
必填
time
string
示例:1605580650
必填
data
object
示例:null
必填

说明 / 示例

接收到消息的格式 ```json { "type":"touser", "data":{ "type":消息类型, "content":消息主体, "send_user":消息发送者的用户信息 } } ```