# Quick Configuration Mini Program Server Domain Name
Interface should be called on the server side, seeHattori API。
# Interface Dxplaination
# Interface name
modifyServerDomainDirectly
# Functional description
- The interface is used to configure the domain name of the Mini Program server, and it is no longer necessary to configure the domain name to the third-party platform, but can be directly configured to the authorization Mini Program through the interface. However, after the configuration is successful, the domain name configured through the interface will not really take effect until the code is submitted or released online.
- Please check before using.On behalf of the development of Mini Program domain name configuration instructions
- If you encounter problems during use, you canOpen Platform Service Provider ZonePosting exchanges.
# Note
- Since the interface is to configure the server domain name directly for the Mini Program account, the relevant rules limit the alignment of ordinary Mini Programs.https://developers.weixin.qq.com/miniprogram/dev/framework/ability/network.html.
- Since there are currently two ways to configure the domain name for a third-party development Mini Program, please check the detailed business logic explaination before calling the interface to avoid misoperation. Details can be viewedhttps://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/product/domain.html
Instructions for use:
1, because the domain name of a Mini Program account can be configured through the public platform, it can be configured through themodify_domainInterface configuration, can also be configured by changing the interfaceBut if it's throughmodify_domainInterface configuration domain name will do some processing in the release link
2, therefore, in order to facilitate developers to better understand the effect of the domain name configuration of different channels is finally effective, can be obtained through theget_effective_domainInterface acquisition “effective_Domaian” Information before you release the code.
# Calling mode
# HTTPS call
POST https://api.weixin.qq.com/wxa/modify_domain_directly?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
初始值 | type | Required | Introductions |
---|---|---|---|
access_Token | string | yes | Interface invokes the certificate, which is URL Parameters, non Body Parameters. useauthorizer_access_Token |
action | string | yes | Operation type |
requestdomain | array | yes | request Legal domain namewhen action yes get No need for this word. |
wsrequestdomain | array | yes | socket Legal domain namewhen action yes get This field is not required when |
uploaddomain | array | yes | uploadFile Legal domain namewhen action yes get This field is not required when |
downloaddomain | array | yes | downloadFile Legal domain namewhen action yes get This field is not required when |
udpdomain | array | yes | udp Legal domain namewhen action yes get This field is not required when |
tcpdomain | array | yes | tcp Legal domain namewhen action yes get This field is not required when |
# Return parameters
attribute | type | Introductions |
---|---|---|
errcode | number | Error 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: HTTPS requests
# Sample Request Data
{
"action": "add",
"requestdomain": ["https://www.qq.com", "https://www.qq.com"],
"wsrequestdomain": ["wss://www.qq.com", "wss://www.qq.com"],
"uploaddomain": ["https://www.qq.com", "https://www.qq.com"],
"downloaddomain": ["https://www.qq.com", "https://www.qq.com"],
"udpdomain": ["udp://melody.WeChat.melody.com"],
"tcpdomain": ["tcp://melody.WeChat.melody.com"]
}
# Return Data Example
{
"errcode": 0,
"errmsg": "ok"
}
# Error code
Error code | Error code | Solutions |
---|---|---|
0 | ok | ok |
85015 | This is not a Mini Program account. | This is not a Mini Program account. |
86100 | invalid url protocol | The URL's protocol header is incorrect. |
45082 | need icp license for the url domain | |
86101 | Configuration api.wechat.qq.com is not supported | |
85016 | exceed valid domain count | Domain Name Limit |
86102 | You can only modify the domain name 50 times per month. |