关键词回复API,允许自定义关键词及回复内容; >本功能仅支持小程序和小游戏。 通过这个功能,你将可以动态的设置关键词回复的内容,从而增加自定义的玩法。 1. 关键词回复API优先级大于后台设定的关键词; 2. 支持匹配多个关键词;1/2/3即是匹配1、2、3这三个关键词。 > **注意:sesion-from最大字符串长度为1024,超过1024会被截取,导致json出错** 文本 ``` <button type='default' session-from='{"api_reply_type": "keyword","api_keyword":"1/2/3","reply_type":"text","description": "文本回复"}' open-type="contact" >关键词回复文本</button> ``` ![](https://box.kancloud.cn/7ed3041b7a6fc61d9e6ec93a46ec1fb6_398x105.png) 图文链接 ``` <button type='default' session-from='{"api_reply_type": "keyword","api_keyword":"1/2/3","reply_type":"multiple","title": "标题","description": "描述","url": "链接","thumb_url": "图片地址"}' open-type="contact" >关键词回复图文链接</button> ``` ![](https://box.kancloud.cn/8e3548a7b9b53e95302db3caf84a1524_392x150.png) 图片 ``` <button type='default' session-from='{"api_reply_type": "keyword","api_keyword":"1/2/3","reply_type":"image","thumb_url": "图片地址"}' open-type="contact" >关键词回复图片</button> ``` ![](https://box.kancloud.cn/d63fb93c33053b0cfa1d942bd3bf48b0_400x142.png) 小程序卡片 ``` <button type='default' session-from='{"api_reply_type": "keyword","api_keyword":"1/2/3","reply_type":"card","title": "标题","page_path": "路径","thumb_url": "图片地址"}' open-type="contact" >关键词回复卡片</button> ``` ![](https://box.kancloud.cn/604401f578cb83cd8159f25b5f88ac9d_398x363.png) 链接 ``` <button type='default' session-from='{"api_reply_type": "keyword","api_keyword":"1/2/3","reply_type":"url","title": "标题","url": "链接地址"}' open-type="contact" >关键词回复链接</button> ``` ![](https://box.kancloud.cn/b4d704f742eeef9acd866b2eab17cbb0_389x124.png)