查询小程序引导卡片模板
小程序引导卡片模板为开发者提供了一种基于小程序卡片模板的消息发送方式,即应用创建卡片模板时只需传入卡片背景图、卡片标题、卡片文字描述等封面内容,在发送消息时再传入具体的卡片跳转地址。
- •开发者首先需要通过创建小程序引导卡片模板接口创建一个小程序引导卡片模板,或本接口获取历史创建的小程序引导卡片模板,最终获取小程序引导卡片模板对应的 card_template_id
使用限制
无
接口说明
无
基本信息
名称 | 描述 |
HTTP URL | https://open.douyin.com/api/douyin/v1/im/get_applet_template/ |
HTTP Method | POST |
Scope | im.microapp_card |
权限要求 |
|
请求头
名称 | 类型 | 是否必填 | 描述 |
Content-Type | string | true | 固定值 "application/json" |
access-token | string | true |
请求参数
Body
名称 | 类型 | 是否必填 | 描述 | 示例 |
card_template_id | string | false | 卡片模板ID | @8hxdhauTCMppanGnM4ltGM780mDqPP+KPpR0qQOmLVAXb/T060zdRmYqig357zEBq6CZRp4NVe6qLIJW/V/x1w== |
count | int | false | 每页数量,不传 card_template_id 时,该值必传,最大值为 50 | 20 |
cursor | int | false | 偏移量 | 21 |
status | int | false | 卡片状态,缺省则返回所有状态的数据 | 1 |
请求示例
curl -X POST 'https://open.douyin.com/api/douyin/v1/im/get_applet_template/' -H 'Content-Type:application/json' -H 'access-token:clt.943da17996fb5cebfbc70c044c3fc25a57T54DcjT6HNKGqnUdxzy1' --data '{"cursor":0,"count":50}'
响应参数
名称 | 类型 | 描述 | 示例 | ||
data | | | struct | | |
| cursor | | int | 偏移量 | 12 |
| has_more | | bool | | false |
| list | | list<struct> | | |
| | card_template_id | string | 卡片模板ID | @8hxdhauTCMppanGnM4ltGM780mDqPP+KPpR0qQOmLVAXb/T060zdRmYqig357zEBq6CZRp4NVe6qLIJW/V/x1w== |
| | card_type | int | 卡片类型 | 1 |
| | content | string | 卡片内容 | 邀请你一起游戏 |
| | create_time | int | 创建时间(秒级时间戳) | 1571075129 |
| | app_icon_url | string | 小程序应用图标 url | |
| | app_id | string | 小程序 AppID | tt5a3daab12c281517910 |
| | name | string | 小程序应用名称 | 小程序应用 |
| | status | int | 卡片状态 0:待审核 1:审核通过 2:审核未通过 | 1 |
| | title | string | 卡片标题 | 卡片 title |
| | update_time | int | 更新时间(秒级时间戳) | 1571075129 |
| | reject_reasons | string | 审核拒绝原因(若卡片状态为审核为未通过) | 详细拒绝原因 |
| extra | | struct | | |
| | description | string | 错误码描述 | |
| | error_code | int | 错误码 | 0 |
| | logid | string | 标识请求的唯一id | 202008121419360101980821035705926A |
| | now | int | 毫秒级时间戳 | 1597213176393 |
| | sub_description | string | 子错误码描述 | |
| | sub_error_code | int | 子错误码 | 0 |
响应示例
正常示例
{ "extra": { "now": 1660109739, "logid": "20220810133539010174255181020C5143", "error_code": 0, "description": "", "sub_error_code": 0, "sub_description": "" }, "data": { "error_code": 0, "description": "", "has_more": false, "cursor": 0, "list": [ { "status": 1, "title": "邀请你一起打决胜巅峰匹配赛", "content": "点击加入", "card_template_id": "@72MqHzC5kqIEgB56A10R9n1psNsNe8gPbkeqQAHKbHqoQ5jL3za3OAGvMtWtnszA", "card_type": 1, "media_id": "@72MqHzC5kqIEgB56A10R9n1psNsNe8gPbkeqQAHKbHqoQ5jL3za3OAGvMt", "name": "决胜巅峰", "app_icon_url": "https://p3-developer-sign.bytemaimg.com/tos-cn-i-ke512zj2cu/a37b56ae3da84c2b98e4ad3e1ac7a1320~tplv-ke512zj2cu-144x144.jpeg?x-expires=2628437565&x-signature=kRfqYlvF17z%2FYdspB5lHAEQBzQM%3D", "create_time": 1571075129, "update_time": 1571075129 } ] } }
异常示例
{ "extra": { "sub_description": "", "sub_error_code": 0, "description": "参数不合法", "error_code": 2100005, "logid": "202203271807199888808121990491456D", "now": 1648375639 }, "data": { "error_code": 2100005, "description": "参数不合法" } }
错误码
HTTP 状态码 | 错误码 | 描述 | 排查建议 |
200 | 0 | 请求成功 | |