企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
获取好友消息接口传递参数 提交方式:POST 数据格式:Content-Type: application/json 提交时间:有好友消息产生时 注意:所有可能输入汉字的地方,都可能会出现emoji表情,需要数据库编码支持,或者程序进行utf8转码,包括各类昵称,聊天消息内容 1、纯文字信息 ~~~ { "msgdata":{ //消息内容数据 "MsgId":"2920358300090669520", //消息ID,唯一 "FromUserName":"@27a5594cbc485aacfa1c96b4af307378", //好友临时ID "ToUserName":"@581affebfdf5c0878323332f1345b9aebd033cfc19146f21e517c2e5bb02c918", //消息接收人临时ID "MsgType":1, //消息类型,1=文本,3=图片 "Content":"活着的意义就是折腾", //消息内容 "Status":3, "ImgStatus":1, "CreateTime":1489761913, //消息发送时间 "VoiceLength":0, "PlayLength":0, "FileName":"", "FileSize":"", "MediaId":"", "Url":"", "AppMsgType":0, "StatusNotifyCode":0, "StatusNotifyUserName":"", "RecommendInfo":{ "UserName":"", "NickName":"", "QQNum":0, "Province":"", "City":"", "Content":"", "Signature":"", "Alias":"", "Scene":0, "VerifyFlag":0, "AttrStatus":0, "Sex":0, "Ticket":"", "OpCode":0 }, "ForwardFlag":0, "AppInfo":{ "AppID":"", "Type":0 }, "HasProductId":0, "Ticket":"", "ImgHeight":0, "ImgWidth":0, "SubMsgType":0, "NewMsgId":2920358300090669600, //加密的消息ID "OriContent":"", "Type":"Text", "Text":"活着的意义就是折腾" //消息的纯文本内容,过滤掉emoji表情等特殊符号 }, "msgchat":{ "MemberCount":0, "NickName":"小红", //好友昵称 "UserName":"@27a5594cbc485aacfa1c96b4af307378", //好友临时ID "RemarkName":"王小红" //好友备注名 }, "msgmember":{ } } ~~~ 2、图片消息(图片与消息数据分开上传) ~~~ { "msgdata":{ //消息内容数据 "MsgId":"6605200808243915066", //消息ID,唯一 "FromUserName":"@@fcacbc7ef44be0b118fcc3e3d8f312f435b0aa7ed76500a8d39ae1b631be02db", //群临时ID "ToUserName":"@581affebfdf5c0878323332f1345b9aebd033cfc19146f21e517c2e5bb02c918", //消息接收人临时ID "MsgType":3, //消息类型,3=图片 "Content":"", //消息发送内容 "Status":3, "ImgStatus":2, "CreateTime":1489760145, //消息发送时间 "VoiceLength":0, "PlayLength":0, "FileName":"170317-221842.png", //图片名称 "FileSize":"", "MediaId":"", "Url":"", "AppMsgType":0, "StatusNotifyCode":0, "StatusNotifyUserName":"", "RecommendInfo":{ "UserName":"", "NickName":"", "QQNum":0, "Province":"", "City":"", "Content":"", "Signature":"", "Alias":"", "Scene":0, "VerifyFlag":0, "AttrStatus":0, "Sex":0, "Ticket":"", "OpCode":0 }, "ForwardFlag":0, "AppInfo":{ "AppID":"", "Type":0 }, "HasProductId":0, "Ticket":"", "ImgHeight":120, "ImgWidth":68, "SubMsgType":0, "NewMsgId":6605200808243915000, //加密的消息ID "OriContent":"", "isAt":false, "Type":"Picture", //消息类型的文本表示 "Text":"" }, "msgchat":{ "MemberCount":0, "NickName":"小红", //好友昵称 "UserName":"@27a5594cbc485aacfa1c96b4af307378", //好友临时ID "RemarkName":"王小红" //好友备注名 }, "msgmember":{ } } ~~~ 3、群邀请信息/红包信息等,仅限于微信手机端或者电脑客户端打开的信息 ~~~ { "msgdata":{ //消息内容数据 "MsgId":"4798005844400401060", //消息ID,唯一 "FromUserName":"@27a5594cbc485aacfa1c96b4af307378", //群临时ID "ToUserName":"@581affebfdf5c0878323332f1345b9aebd033cfc19146f21e517c2e5bb02c918", //消息接收人临时ID "MsgType":49, //消息类型,49=APP消息,仅限于微信手机端或者电脑客户端打开 "Content":"该类型暂不支持,请在手机上查看", //消息发送内容 "Status":3, "ImgStatus":0, "CreateTime":1489763407, //消息发送时间 "VoiceLength":0, "PlayLength":0, "FileName":"", "FileSize":"", "MediaId":"", "Url":"", "AppMsgType":0, "StatusNotifyCode":0, "StatusNotifyUserName":"", "RecommendInfo":{ "UserName":"", "NickName":"", "QQNum":0, "Province":"", "City":"", "Content":"", "Signature":"", "Alias":"", "Scene":0, "VerifyFlag":0, "AttrStatus":0, "Sex":0, "Ticket":"", "OpCode":0 }, "ForwardFlag":0, "AppInfo":{ "AppID":"", "Type":0 }, "HasProductId":0, "Ticket":"", "ImgHeight":0, "ImgWidth":0, "SubMsgType":0, "NewMsgId":4798005844400401000, //加密的消息ID "OriContent":"", "Type":"Sharing", "Text":"" }, "msgchat":{ "MemberCount":0, "NickName":"小红", //好友昵称 "UserName":"@27a5594cbc485aacfa1c96b4af307378", //好友临时ID "RemarkName":"王小红" //好友备注名 }, "msgmember":{ } } ~~~ 接口返回参数格式:JSON ~~~ { "code":200, //状态码 "msg":'信息保存成功' //提示信息 } ~~~