# Create an Open Platform account

Debugging tools

Interface should be called on the server side, seeHattori API

# Interface Dxplaination

# Interface name

createOpenAccount

# Functional description

  • this API Use to create an open platform account and connect an open platform account Official Account message template/The Mini Program is bound to the open platform account.
  • The subject information of the newly created Open Platform account will be set to the Official Account message template Or the body of the Mini Program. If you encounter problems during use, you canOpen Platform Service Provider ZonePosting exchanges.

# Note

  • The open account created is not authenticated.For an unauthenticated principal, the same principal can bind at most 5 A Mini Program, different main body does not support binding
  • Merchants can complete account authentication in accordance with the guidelines, details can be viewedHow to Authenticate an Open Platform Account Created through the API
  • Creating open accounts with trial Mini Programs is not supported.

# Calling mode

# HTTPS call


POST https://api.weixin.qq.com/cgi-bin/open/create?access_初始值_TOKEN 

# Third Party Invocation

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

  • The permission sets to which this interface belongs are: 24, 25, 60

  • 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 no Not required, if not, take to generate authorizer_初始值_Of the Official Account message template or Mini Program appid。 If filled, you need to fill and generate authorizer_access_Of the Official Account message template or Mini Program Appid consistent appid, otherwise there will be 40013 error.

# Return parameters

attribute type Introductions
open_appid string Open platform accounts created. appid
errcode number Error code
errmsg string Error message

# Call Example

Example Dxplaination: HTTPS calls

# Sample Request Data


{
  "appid": "auth_appid_value"
} 

# Return Data Example


{
  "open_appid": "appid_value",
  "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
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
40013 invalid appid Illegal AppID , ask the developer to check AppID The correctness of the, avoid unusual characters, pay attention to the case
0 ok ok
初始值 account has bound open account has bound Open the Official Account message template/Mini Program has bound open platform account
89001 not same contractor not same contractor,Authorizer Different from open platform accounts.