# Get a list of templates

Debugging tools

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 typeIntroductions
errcode number Error code
errmsg string Error message
template_list array List of template information
attribute type Introductions
create_time number Developer Upload Draft Timestamp
user_version string Version Number, Developer Custom Field
user_desc string Version Description Developer Custom Fields
template_id number template id
draft_id number draft id
source_miniprogram_appid string Appid for developing Mini programs
source_miniprogram string The name of the development Mini Program
template_type number 0 corresponds to common template, 1 corresponds to standard template
category_list array Category information for standard templatesAn array with an empty value if it is a normal template
attribute type Introductions
address string The page of the Mini Program, which can be obtained through the "get a list of pages of the Mini Program getCodePage" interface
tag string Mini Program labels, separated by spaces, at most 10 Label length up to 20
first_class string First-level category name, available through the getAllCategoryName interface
second_class string Secondary category name, available through the getAllCategoryName interface
third_class string Third-level category name, available through the getAllCategoryName interface
title string The title of the Mini Program page, at most 32
first_id number First-level category id, available through the getAllCategoryName interface
second_id number Secondary category id, available through the getAllCategoryName interface
third_id number Class III id, available through the getAllCategoryName interface
audit_scene number Scene Labels for Standard TemplatesNormal templates do not return this value
audit_status number Audit Status of Standard TemplatesNormal templates do not return this value
reason string The reason for the rejection of the review of the standard template,Normal templates do not return this value

# 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