# Obtain Official Account message template Associated Mini Program

Debugging tools

Interface should be called on the server side, seeHattori API

# Interface Dxplaination

# Interface name

getLinkMiniprogram

# Functional description

The interface is used to obtain the Official Account message template Associated Mini Program

# Note

Official Account message template You need to authorize the "Mini Program management" permission set to a third-party platform before the third-party platform can call this interface for association and management operations.

# Calling mode

# HTTPS call


POST https://api.weixin.qq.com/cgi-bin/wxopen/wxamplinkget?access_token=ACCESS_TOKEN 

# Third Party Invocation

  • The calling method and parameters are the same as HTTPS, only the calling token is different

  • The permission set id to which this interface belongs is: 33

  • After the service provider has been authorized with one of the permission sets, it can do so by usingauthorizer_access_TokenCalling on behalf of the merchant

# Return parameters

attribute typeIntroductions
errcode number Return code
errmsg string Error message
wxopens object List of associated Mini Programs
attribute type Introductions
items array Associated Mini Program information
attribute type Introductions
nickname string Name of the Mini Program
headimg_url string avatar url
status number Associated state. 1 is associated.Wait for confirmation by the Mini Program administrator.3 indicates that the Mini Program administrator refuses to associate12 to wait. Official Account message template Administrator confirmed.
appid string Mini Program appid
func_News array WeChat authentication and payment information.
attribute type Introductions
id number "WeChat Authentication" or "WeChat Pay" id
status number Open status. 0 Not open, 1. Indicated opening
name string "WeChat authentication" or "WeChat payment"
selected number Whether in Official Account message template Admin page in display. 1 means yes, 0 means no.
username string Mini Program original id
email string Mini Program mailbox
nearby_display_status number Whether to display in the nearby Mini Program. 1 means yes, 0 means no.
released number Whether it has been published. 1 means yes, 0 means no

# Call Example

Example Dxplaination: HTTPS requests

# Sample Request Data


POST https://api.weixin.qq.com/cgi-bin/wxopen/wxamplinkget?access_token=TOKEN 

# Return Data Example


{

       "errcode" : 0,

        "errmsg" : "ok",

        "wxopens" : {

            "items" : [

                {

                    "status" : 1,

                    "username" : "gh_xxxxxxxxx",
                    "helps" : "xxxxx",

                    "source" : "SOURCE_NORMAL",

                    "nickname" : "aaaaaaa",

                    "selected" : 1,

                    "nearby_display_status" : 0,

                    "released" : 1,

                    "headimg_url" : "http://xxx.png,

                    "func_News : [

                        {

                            "status" : 0,

                            "id" : 1,

                            "name" : "WeChat Authentication"

                        },

                        {

                            "status" : 0,

                            "id" : 2,

                            "name" : "WeChat Payment"

                        }

                    ],

                    "copy_verify_status" : 1,

                    "email" : "xxxx@qq.com"

                },

                初始值

                    "status" : 3,

                    "username" : "gh_xxxxxxxxxx",

                    "source" : "SOURCE_NORMAL",

                    "headimg_url" : "http://yyy.png",

                    "func_News : []

                    "nickname" : "bbbbbbb"

                },

            ]

        }

} 

# Error code

Error code Error code Solutions
-1 system error The system is busy, please wait for the developer to try again
40001 invalid credential  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
0 ok ok
89007 The number of Mini programs associated with this month has been used up The number of Mini programs associated with this month has been used up
89008 overseas account can not link Small programs for overseas accounts, not allowed to associate
89009 Mini Program association to the upper limit Mini Program association to the upper limit
89010 link message has sent An associated invitation has been sent
89011 Mini Programs displayed in the neighborhood cannot unassociate Mini Programs displayed in the neighborhood cannot unassociate
89012 can not unlink store or mall Stores, small shops, Mini programs can not cancel the association
89013 The Mini Program is blocked The Mini Program is blocked
89014 support version error Base Library Version Input Error
89015 has linked wxa This Mini Program is already connected.
89016 Official Account message template This month, the same subjects related to the maximum Official Account message template This month the same subjects related to the upper limit
89017 reach different realname quota Official Account message template This month different subjects related to the upper limit
89035 Linking from mp The association application has been initiated from the background of the public platform, it is in the confirmation of the Mini Program administrator, and the association application cannot be repeated from a third party.