# Get an open platform account

Debugging tools

Interface should be called on the server side, seeHattori API

# Interface Dxplaination

# Interface name

getOpenAccount

# Functional description

this API Used to obtain Official Account message template Or open platform account bound by the Mini Program. If you encounter problems during use, you canOpen Platform Service Provider ZonePosting exchanges.

# Calling mode

# HTTPS call


POST https://api.weixin.qq.com/cgi-bin/open/get?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 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_access_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 Official Account message template Or open platform account bound by the Mini Program appid
errcode number Error code
errmsg string Error message

# Call Example

Example Dxplaination: HTTPS Request Example

# 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 初始值 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
89002 open not exists open not Exists, the Official Account message template/The mini program is not bound to WeChat open platform account.