Skip to content
关注公众号,获取新课通知

发送消息

接口URL

https://sqapi2.dishawang.com/api/v1/im/send

请求方式

POST

Content-Type

urlencoded

请求Header参数

参数名示例值参数类型是否必填参数描述
token36040cbcde65e482739afca7a5465ab750c1c5d5String用户token

请求Body参数

参数名示例值参数类型是否必填参数描述
target_id12Integer聊天对象ID
typetextString消息类型:text文本
body哈哈哈String消息内容
client_create_timeInteger客户端发送时间

成功响应示例

json
{
  "code": 1,
  "msg": "ok",
  "data": {
    "name": "哈哈哈",
    "avatar": "http://sqapi2.dishawang.com/storage/uploads/a48a12a09a6654712f2d430d02dbc572.jpeg",
    "state_text": "发送成功",
    "user_id": 7,
    "target_id": 12,
    "type": "text",
    "body": "哈哈哈",
    "client_create_time": "1970-01-21 03:40:24",
    "is_revoke": 0,
    "state": 100,
    "is_push": 0,
    "create_time": "2024-04-07 01:25:56",
    "update_time": "2024-04-07 01:25:56",
    "id": 152
  }
}