Usage: Copy the structured message code and paste it into the input box of the IM console to immediately send a structured message and see the display result
Parameters
Parameter Name | Type | Value | Required | Description |
---|---|---|---|---|
title | String | Yes | Title | |
description | String | No | Description | |
img_url | String | No | If the value is empty, it will not be displayed | |
buttons | Object[] | No | Button group | |
buttons.type | String | link (Link), phone (Phone), sdk_callback (SDK Callback Function) | No | Button type |
buttons.text | String | No | Button display text | |
buttons.value | String | No | Corresponding value of button type | |
buttons.callback_name | String | No | Callback function name, only available when type is sdk_callback |
Example
##UDESK_IM_STRUCT_MSG##
{
"title": "Test API Sending Structured Message",
"description": "This message is from API",
"img_url": "https://www.udesk.cn/images/index/banner01.jpg",
"buttons": [
{
"type": "link",
"text": "Visit",
"value": "https://www.udesk.cn"
},
{
"type": "phone",
"text": "Call",
"value": "010-12345678"
},
{
"type": "sdk_callback",
"callback_name": "sdk_callback",
"text": "Callback Button",
"value": "v1"
}
]
}