# Configure Mini Program business domain name

Debugging tools

Interface should be called on the server side, seeHattori API

# Interface Dxplaination

# Interface name

modifyJumpDomain

# Functional description

  • For a Mini Program authorized to a third party, its business domain name can only be the Mini Program business domain name configured in the account of the third party platform. When the Mini Program releases the code through a third party, the business domain name originally configured by the Mini Program will be deleted, and only the domain name of the third-party platform will be retained, so the third-party platform needs to call the interface to add the business domain name for the Mini Program before releasing the code instead of the Mini Program.
  • If you encounter problems during use, you canOpen Platform Service Provider ZonePosting exchanges.

# Note

  • You need to register the business domain name in the Mini Program business domain name of the third party platform before you can call the interface for configuration.
  • Support the configuration of subdomain names when configuring domain names for authorized Mini Programs, such as business domain names registered by third parties for Qq.com, you can directly qq.com And its sub-domains (such as Xxx.qq.com) is also configured into the authorized Mini Program. And so on, for example, the business domain name registered by a third party is Xxx.qq.com, it is possible to place the xxx.qq.com And its sub-domains (such as Yyy.xxx.qq.com) is also configured to the authorized Mini Program.
  • Up to 200 business domain names can be added.
  • Supports https only.

# Calling mode

# HTTPS call


POST https://api.weixin.qq.com/wxa/setwebviewdomain?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: 18

  • 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
action string no Operation type, if not specified Action, the default is to add all the Mini Program business domain names registered by the third-party platform to the Mini Program
webviewdomain array no Mini Program business domain name, when action The parameters are get This field is not required when

# Return parameters

attribute type Introductions
errcode number Return code
errmsg string Error message

# Other Notes

# action Optional value

Optional value Introductions
add Add to
delete delete
set cover
get Obtain

# Call Example

Example Dxplaination: Setting Up Business Domain

# Sample Request Data


{
  "action": "add",
  "webviewdomain": ["https://www.qq.com", "https://m.qq.com"]
} 

# Return Data Example


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

# Error code

Error code Error code Solutions
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
89019 webview domain not change No changes to the business domain name, no need to repeat the settings
89020 open's webview domain is null! Need to set open's webview domain first! Have not set the Mini Program business domain name, please set the Mini Program business domain name in the third party platform before calling this interface
89021 request domain is not open's webview domain! The requested saved domain name is not an Mini Program business domain or subdomain that has been set up in a third-party platform
89029 The number of business domains exceeds the limit, up to 100 business domains can be added
89231 not support Single Individual Mini Programs do not support calling setwebviewdomain interface