发送链接消息

参数

参数名 必选 类型 说明
cmd string 请求方法
user_id string 当前客户端的用户ID
request_key string 操作key,自定义的一个字符串,用于取回调消息的时候对应上相关的操作
params.con_id string 会话id
params.title string 链接标题
params.desc string 链接描述
params.img_url string 链接图片
params.url string 链接跳转地址

请求参数示例

{
  "cmd":"SendLinkMsg",
  "user_id":"168xxxxxxx",
  "request_key":"xxxxxxx",
  "params": {
    "con_id":"xxxxxxx",
    "title":"标题",
    "desc":"描述",
    "url":"http://www.baidu.com",
    "img_url":"https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F4k%2Fs%2F02%2F2109242332225H9-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1648305006&t=c72662595164b84fffe73ffc3cbc3a24"
  }
}

回调参数详解

参数名 类型 说明
is_room_msg int 是否是群消息
msg_local_id int 本地消息id
msg_server_id int 服务器消息id
msg_unique_identifier string 消息的标识,可用于做转发
msgtype int 消息类型:2文字
receiver string 接收者:可以是群或者好友的id
sender_id string 发送者:一般是用户id
request_key string 请求key,做来对应发起的请求操作的
sender_nickname string 发送者昵称
timestamp int 消息发送时间

回调结果示例

{
    "type":15001,
    "cmd_type":"SendMsgCall",
    "user_id":"168xxxxxxxxxxxx",
    "request_key":"1231233",
    "data":{
        "desc":"",
        "is_room_msg":0,
        "msg_local_id":211,
        "msg_server_id":1010087,
        "msg_unique_identifier":"CAEQga3ekxxxxxxxx",
        "msgtype":13,
        "receiver":"7881xxxxxxxx",
        "request_key":"1231233",
        "sender_id":"168xxxxxxxx",
        "sender_nickname":"周666",
        "thumburl":"https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F4k%2Fs%2F02%2F2109242332225H9-0-lp.jpg\u0026refer=http%3A%2F%2Fimg.jj20.com\u0026app=2002\u0026size=f9999,10000\u0026q=a80\u0026n=0\u0026g=0n\u0026fmt=jpeg?sec=1648305006\u0026t=c72662595164b84fffe73ffc3cbc3a24",
        "timestamp":1645713026,
        "title":"5qCH6aKY",
        "url":"http://www.baidu.com"
    }
}
Copyright © wkteam.cn 2020 all right reserved,powered by Gitbook该文件修订时间: 2022-08-06 23:28:46

results matching ""

    No results matching ""