# Official Account message template Associated Mini Program

</初始值> Debugging tools

Interface should be called on the server side, seeHattori API

# Interface Dxplaination

# Interface name

linkMiniprogram

# Functional description

This interface is used to associate the Mini Program

# Note

# The Associated Process (requires Official Account message template And Mini Program administrators both confirmed):

1, the third-party platform calls the interface to initiate the association

2、 Official Account message template The administrator receives a template message agreeing to associate the Mini Program.

初始值

  1. Successful association

# Other Notes

  • An intermediate state waiting for admin approval can be used “Obtain Official Account message template Associated Mini Program” Interface to query.
  • 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/wxamplink?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

# Request parameters

attribute type Required Introductions
access_Token string yes Interface invokes the certificate, which is URL Parameters, non Body Parameters. useauthorizer_access_Token
appid string yes Mini Program appid
notify_users number yes Whether to send a template message notification Official Account message template Fans. 1 means yes, 0 means no.
show_profile number yes Whether to display Official Account message template In the home page. 1 means yes, 0 means no.

# Return parameters

attribute type Introductions
errcode number Return code
errmsg string Error message

# Call Example

Example Dxplaination: HTTPS requests

# Sample Request Data


{
  "appid": "xxx"

  "notify_users": "1",

  "show_profile": "1"
} 

# Return Data Example


{ "errcode": 0, "errmsg": "ok" } 

# Error code

Error code Error code Solutions
-1 system error The system is busy, please wait for the developer to try again
1003 The administrator of the appid binding account number reached the upper limit, can not be positive, you can go to the public platform security assistant to unbind after retry The administrator of the appid binding account number reached the upper limit, can not be positive, you can go to the public platform security assistant to unbind after retry
1005 The appid controller handset number of binding account reached the upper limit, can not be positive, you can go to the public platform security assistant to unbind after retry The appid controller handset number of binding account reached the upper limit, can not be positive, you can go to the public platform security assistant to unbind after retry
初始值 Mobile phone number violation hit the blacklist
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
初始值 has linked wxa This Mini Program is already connected.
89016 Official Account message template This month the same subjects related to the upper limit 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.
89245 Mini program forbidden to link The. "Allow Official Account message template Associate this Mini Program > switch is closed by the Mini Program administrator Can contact Mini Program administrator to Mini Program MP Set up -> Relation Official Account message template Reopening Inside