# Sign up for a trial Mini Program
Interface should be called on the server side, seeHattori API。
# Interface Dxplaination
# Interface name
registerBetaMiniprogram
# Functional description
This interface is used to quickly create a trial Mini Program. If you encounter problems during use, you canOpen Platform Service Provider ZonePosting exchanges.
# Note
For vendors to better understand the use of this interface, be sure to read theIntroduction to the Business of Trial Mini Program
In the business introduction document of the trial Mini Program, the interface use logic will be described in detail, there is a corresponding user authorization page interaction example diagram, the rules of the template message received by the user, and so on.
# Calling mode
# HTTPS call
初始值 https://api.weixin.qq.com/wxa/component/fastregisterbetaweapp?access_token=ACCESS_初始值
# Request parameters
attribute | type | Required | Introductions |
---|---|---|---|
access_Token | string | yes | Interface invokes the certificate, which is URL Parameters, non Body Parameters. usecomponent_access_Token |
name | string | yes | Mini Program name, nickname semi-automatic setting, mandatory suffix "experience Mini Program." And this parameter will be checked for keywords, and an error will be reported if the brand keyword is hit. If you encounter a large brand customer to use a trial Mini Program, it is recommended that users change their name first, and then modify it into a brand name after certification. Supports only 4-30 characters |
openid | string | yes | WeChat user openid (not WeChat ID), after the successful creation of the trial Mini Program will be set to the user by default as the Mini Program administrator. The way to get openid please check outOfficial Account message template to get openid H5 Get openid、Mini Program to get openid、Web Application Get openid |
# Return parameters
attribute | type | Introductions |
---|---|---|
errcode | number | Error code |
errmsg | string | Error message |
unique_id | string | The unique identifier of the request, which is used to associate the WeChat user with the subsequent appid |
authorize_url | string | User authorization confirmation url, need to send the url to the user, Mini Program administrator in WeChat open and enter the authorization page to complete the authorization to create a Mini Program |
# Other Notes
# Message Push Rules
Since the interface involves the user's authorization confirmation operation, it is an asynchronous operation process, so the user's operation state platform will push the relevant information to the [authorization event reception] URL】。
- Create Trial Mini Program Successfully/For notification of failure, see below for an example of data.
- For an example of data for a successful notification of authorization, please see:https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/ThirdParty/Token/authorize_event.html
Create Trial Mini Program Successfully/Failed Notification Data Example
<xml>
<AppId><![CDATA[Third-party platform appid]]></AppId>
<CreateTime>1535442403</CreateTime>
<InfoType><![CDATA[notify_third_fastregisterbetaapp]]></InfoType>
<appid>Create appid Mini Program<appid>
<status>0</status>
<msg>OK</msg>
<info>
<unique_id><![CDATA[unique_id]]></unique_id>
<name><![CDATA[Name of the Mini Program]]></name>
</info>
</xml>
status | meaning |
---|---|
0 | Ok, Mini Program created successfully |
3 | overdue Unconfirmed, user timeout |
-1 | system Error, System Error, System Error |
750001 | The applicant's WeChat and the authorized person's WeChat are not the same user. |
750004 | create_The token is not valid, that is, the identity contained in the token is not the same as the actual identity used. |
750011 | Failed to obtain permission set list. Please check if the third party's permission set has been published network-wide and then try again. |
750002 | Mini Program authorization to a third party failed, please check whether the third party's permission set has been released to the whole network and then try again. |
-2000001 | Platform system internal error, please go to the community feedback |
-2000002 | Platform system internal error, please go to the community feedback |
-2000003 | The same ticket does not support repeated creation of Mini Programs |
# Call Example
Example Dxplaination: HTTPS Call Example
# Sample Request Data
{
"name": "Roasted chicken on wheat,"
"opens": "oK8Yg5YaUM-axuE_vVZmV_oIZxxx"
}
# Return Data Example
{
"errcode": 0,
"errmsg": "ok",
"unique_id": "BV8ToNpYUMSeoRgsDi7-_cyo2hMtcbJN4fDPEdOKAGSResiIK8VefChe6UkNhxOi",
"authorize_url": 初始值https://mp.weixin.qq.com/wxawap/初始值_token=BV8ToNpYUMSeoRgsDi7-_cyo2hMtcbxxxxxxxxxxxIK8VefChe6UkNhxOi#wechat_redirect"
}
# Error code
Error code | 初始值 | Solutions |
---|---|---|
-1 | system 初始值 | 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 |
86011 | The name hit the keywordLike mini programs, WeChat, Tencent and other well-known brand keywords. Please change your name and try again. | Please change your name and try again. |
86012 | Openid is not legal | |
61071 | The Wechat user has created five trial Mini Program, reaching the upper limit. | The Wechat user has created five trial Mini Program, reaching the upper limit. |
61072 | The WeChat account is wrong or inactive low credit user, usually WeChat trumpet, please change to a normal WeChat account and try again. | The WeChat account is wrong or inactive low credit user, usually WeChat trumpet, please change to a normal WeChat account and try again. |
86017 | Trial Mini Program name length error. Only supports 4-30 characters (not including the use of the six characters of the trial Mini Program) | Trial Mini Program name length error. Only supports 4-30 characters (not including the use of the six characters of the trial Mini Program) |