发送仅特定人可见的消息卡片
POST
/open-apis/ephemeral/v1/send

使用场景
错误码
请求体demo
{
"open_id":"ou_515fbe9d04838174e2035f801453d07f",
"chat_id":"oc_286e0a771a76d99f1ec72737ef92ee8d",
"msg_type": "interactive",
"card": {
"elements": [
{
"tag": "div",
"text": {
"tag": "plain_text",
"content": "overflow & datePicker 功能"
},
"fields": [
{
"is_short": true,
"text": {
"tag": "lark_md",
"content": "**组件模块:**\noverflow & datePicker"
}
},
{
"is_short": false,
"text": {
"tag": "lark_md",
"content": "**功能点:**\n"
}
}
]
},
{
"tag": "hr"
},
{
"tag": "action",
"actions": [
{
"tag": "overflow",
"confirm": {
"title": {
"tag": "plain_text",
"content": "请确认"
},
"text": {
"tag": "plain_text",
"content": "跳转方式"
}
},
"options": [
{
"text": {
"tag": "plain_text",
"content": "多端跳转"
},
"multi_url": {
"url": "https://www.baidu.com",
"android_url": "https://developer.android.com/",
"ios_url": "https://developer.apple.com/",
"pc_url": "https://www.windows.com"
},
"value": "james"
},
{
"text": {
"tag": "plain_text",
"content": "指定跳转"
},
"url": "https://www.baidu.com"
},
{
"text": {
"tag": "plain_text",
"content": "文本内容"
},
"value": "joy"
},
{
"text": {
"tag": "plain_text",
"i18n": {
"zh_cn": "中文文本-james",
"en_us": "English text-james",
"ja_jp": "日本語文案-james"
}
},
"value": "james"
}
]
},
{
"tag": "date_picker",
"placeholder": {
"tag": "plain_text",
"content": "请选择日期(配有confirm)"
},
"confirm": {
"title": {
"tag": "plain_text",
"content": "请确认"
},
"text": {
"tag": "plain_text",
"content": "跳转方式"
}
}
},
{
"tag": "date_picker",
"placeholder": {
"tag": "plain_text",
"content": "请选择日期"
},
"initial_date": "2002-2-22"
},
{
"tag": "picker_time",
"placeholder": {
"tag": "plain_text",
"content": "请选择日期(配有confirm)"
},
"confirm": {
"title": {
"tag": "plain_text",
"content": "请确认"
},
"text": {
"tag": "plain_text",
"content": "跳转方式"
}
}
},
{
"tag": "picker_time",
"placeholder": {
"tag": "plain_text",
"content": "请选择日期"
},
"initial_time": "19:09"
},
{
"tag": "picker_datetime",
"placeholder": {
"tag": "plain_text",
"content": "请选择日期(配有confirm)"
},
"confirm": {
"title": {
"tag": "plain_text",
"content": "请确认"
},
"text": {
"tag": "plain_text",
"content": "跳转方式"
}
}
},
{
"tag": "picker_datetime",
"placeholder": {
"tag": "plain_text",
"content": "请选择日期"
},
"initial_datetime": "2002-2-22 18:00"
}
]
}
]
}
}
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://open.feishu.cn/open-apis/ephemeral/v1/send' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"chat_id": "oc_xxxxxxxxxxxx",
"open_id": "ou_xxxxxxxxxxxx",
"msg_type": "interactive",
"card": {
// card content
}
}'
响应示例响应示例
{
"code": 0,
"data": {
"message_id": "om_fd2057276f16243756ff8eb6fcd7b705"
},
"msg": "ok"
}
请求参数
Header 参数
Authorization
string
必需
默认值:
Bearer {{access_token}}
Content-Type
string
必需
默认值:
application/json; charset=utf-8
Body 参数application/json
返回响应
修改于 2023-01-12 09:50:56