# 获取接入方素材
(旧名:预设欢迎语)
# 中台代码
GetCustomMaterial
# 请求方式
POST
# 请求参数
# 说明
参数 | 必须 | 说明 |
---|---|---|
app_id | 是 | 企微中台应用 id |
qw_corpid | 是 | 企微企业 id |
qw_userid | 是 | 企微里的 userid,即所谓的企业微信成员账号(qq.com) (opens new window)。 |
qw_external_userid | 是 | 企微成员的外部联系人 id |
qw_state | 是 | 添加外部联系人事件中的 state 字段 |
create_time | 是 | 添加外部联系人事件的创建时间,10 位秒级时间戳 |
origin_text | 否 | 欢迎语文本 |
origin_attachments.type | 是 | 附件类型:1-图片,2-小程序,3-H5,4-视频,5-文件 |
origin_attachments.img_url | 否 | 图片 url。type=1 时必传 |
origin_attachments.h5_href | 否 | H5 链接。type=3 时必传 |
origin_attachments.h5_title | 否 | H5 标题。type=3 时必传 |
origin_attachments.h5_description | 否 | H5 描述。 |
origin_attachments.video_url | 否 | 视频 url。type=4 时必传 |
origin_attachments.file_url | 否 | 文件 url。type=5 时必传 |
origin_attachments.miniprogram_title | 否 | 小程序标题。type=2 时必传 |
origin_attachments.miniprogram_appid | 否 | 小程序 appid。type=2 时必传 |
origin_attachments.miniprogram_url | 否 | 小程序路径。type=2 时必传 |
origin_attachments.cover_url | 否 | 封面 url。type=2 时必传 |
# 示例
{
"app_id": "39fdda6e-a341-5e67-e243-d4ec9da063b8",
"corp_id": "wwwwwxxxxx",
"qw_userid": "zhangsan",
"qw_external_userid": "woAJ2GCAAAXtWyujaWJHDDGi0mAAAA",
"qw_state": "cc:111111111111111",
"create_time": 1630554452,
"origin_text": "这里是欢迎语文本",
"origin_attachments": [
{
"type": 2,
"img_url": "",
"h5_href": "",
"h5_title": "",
"h5_description": "",
"video_url": "",
"file_url": "",
"miniprogram_title": "消息标题",
"miniprogram_appid": "wx8bd80126147dfAAA",
"miniprogram_url": "/path/index.html",
"cover_url": "https://example.pic.com/path.jpg"
}
]
}
# 返回参数
# 说明
注意:text 和 attachments 不能同时为空
参数 | 说明 |
---|---|
errcode | 返回码。0 表示成功 |
errmsg | 对返回码的文本描述内容 |
text | 消息文本内容,最长为 4000 字节 |
attachments.type | 附件类型:1-图片,2-小程序,3-H5,4-视频,5-文件 |
attachments.img_url | 图片 url。type=1 时必传 |
attachments.h5_href | H5 链接。type=3 时必传 |
attachments.h5_title | H5 标题。type=3 时必传 |
attachments.h5_description | H5 描述。 |
attachments.video_url | 视频 url。type=4 时必传 |
attachments.file_url | 文件 url。type=5 时必传 |
attachments.miniprogram_title | 小程序标题。type=2 时必传 |
attachments.miniprogram_appid | 小程序 appid。type=2 时必传 |
attachments.miniprogram_url | 小程序路径。type=2 时必传 |
attachments.cover_url | 封面 url。type=2 时必传 |
# 示例
{
"errcode": 0,
"errmsg": "ok",
"text": "string",
"attachments": [
{
"type": 2,
"img_url": "",
"h5_href": "",
"h5_title": "",
"h5_description": "",
"video_url": "",
"file_url": "",
"miniprogram_title": "消息标题",
"miniprogram_appid": "wx8bd80126147dfAAA",
"miniprogram_url": "/path/index.html",
"cover_url": "https://example.pic.com/path.jpg"
}
]
}