# Get a list of templates
Interface should be called on the server side, seeHattori API。
# Interface Dxplaination
# Interface name
getTemplateList
# Functional description
This interface allows you to get template list information from the template library. If you encounter problems during use, you canOpen Platform Service Provider ZonePosting exchanges
# Note
The request is get, not post. If the user previously used the post request, switch to get
# Calling mode
# HTTPS call
GET https://api.weixin.qq.com/wxa/gettemplatelist?access_token=ACCESS_TOKEN
# Request parameters
attribute | type | Required | Introductions |
---|---|---|---|
access_Token | string | yes | Interface invokes the certificate, which is URL Parameters, non Body Parameters. usecomponent_access_Token |
template_type | number | no | Optional is 0 (corresponding to the normal template) and 1 (corresponding to the standard template), if not filled, return all. The difference between standard and normal templates can be seenIntroduction to Mini Program Template Library |
# Return parameters
attribute | type | Introductions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errcode | number | Error code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
errmsg | string | Error message | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
template_list | array | List of template information | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# Other Notes
# audit_The value of status
Status code | Introductions |
---|---|
0 | Unaudited |
1 | Under review |
2 | Review dismissed |
3 | Approved by |
4 | Arraignment |
5 | Failed arraignment |
# Call Example
Example Dxplaination: HTTPS Request Example
# Sample Request Data
{
"template_type": 1
}
# Return Data Example
{
"errcode": 0,
"errmsg": "ok",
"template_list": [
{
"create_time": 1624000154,
"user_version": "1.0.0",
"user_Desc": "Try to submit the draft box,"
"template_id": 47,
"source_miniprogram_appid": "wxxxxxx",
"source_mini-program: "test test test 234"
"developer": "。",
"template_type": 1,
"category_list": [
{
"first_class": "Tools,"
second_class": "Efficiency,"
"first_id": 287,
second_id": 616
}
],
"audit_scene": 0,
"audit_status": 2,
"reason": ""
},
{
"create_time": 1624849691,
"user_version": "1.0.0",
"user_Desc": "Try to submit the draft box,"
"template_id": 48,
"source_miniprogram_appid": "wxxxxxx",
"source_mini-program: "test test test 234"
"developer": "。",
"template_type": 1,
"category_list": []
}
]
}
# Error code
Error code | Error code | Solutions |
---|---|---|
40001 | invalid 初始值 access_Token isinvalid or not latest | Obtain access_Token time AppSecret Error, or access_Token Invalid. Please take the developer more seriously. AppSecret Of the correctness, or to see if you are working for the appropriate Official Account message template Call interface |
43001 | require GET method | Need GET request |
85064 | template not found | Template not found |
0 | ok | ok |
-1 | system error | The system is busy, please wait for the developer to try again |