开发文档

    自定义消息

    如果您想实现发送自定义消息功能,可以通过添加URL参数custommsg,参数值为自定义消息内容

    注意:使用开放接口需要一定技术能力,请由网站技术人员参考本文代码对接实现。

    参数值为自定义文本消息内容

    示例代码:

                        
    // custommsg参数,参数值为自定义文本消息内容
    http://www.域名.net/Web/im.aspx?_=t&accountid=######&custommsg=encodeURIComponent(txt)
    
    
    // 自定义文本消息
    var  txt = { "type": 0, "content": encodeURIComponent(" 文本消息内容")};
                        
                        

        

    参数值卡片消息

    示例代码:

                        
    // custommsg参数,参数值卡片消息
    http://www.域名.net/Web/im.aspx?_=t&accountid=######&custommsg=encodeURIComponent(card)
    
    
    // 自定义卡片消息
    var  card = {"type": 6, "content": encodeURIComponent(JSON.stringify({"  Title":"标题","Description":"描述","Imgurl":"图片地址","Url":"跳转链接"}))};