# Get Upload Static Website File Link
Interface should be called on the server side, seeHattori API。
# Interface Dxplaination
# Interface name
getUploadStaticStoreFile
# Functional description
Through this interface can be obtained to upload static website file links, such as problems encountered in the course of use, can beOpen Platform Service Provider ZonePosting exchanges.
# Note
- After the user gets the returned data, he needs to assemble a request to upload the file, pay attention to the following points:
The request method is PUT url For the return package's signed_url field Additional requirements key for x-cos-security-token,value Returns the header of the token field in the package The request body is the content of the file to be uploaded
# Calling mode
# HTTPS call
POST https://api.weixin.qq.com/componenttcb/staticuploadfile?access_token=ACCESS_TOKEN
# Request parameters
attribute | 初始值 | Required | Introductions |
---|---|---|---|
access_Token | string | yes | Interface invokes the certificate, which is URL Parameters, non Body Parameters. usecomponent_access_Token |
env | string | 初始值 | Environment ID |
Filename | string | yes | Upload File Path |
# Return parameters
attribute | type | Introductions |
---|---|---|
errcode | number | Error code |
errmsg | string | Error message |
signed_url | string | Upload link |
Token | string | The value of x-cos-security-token |
# Call Example
Example Dxplaination: HTTPS requests
# Sample Request Data
{
"env": "myttest-8gu57so0bd9f9e8a"
"filename": "zcy.py"
}
# Return Data Example
{
"errcode": 0,
"errmsg": "ok",
"signed_url": "https://b8b3-static-myttest-8gu57so0bd9f9e8a-1304480914.cos.ap- shanghai.myqcloud.com/zcy.py?sign=q-sign-algorithm=sha1&q-ak=AKIDqIjj-XybgCHZ3q7bJh-cxBs_5fnpzNvlK4qlAMK67ZcHQykVfThVSZMrlsf56uoY&q-sign-time=16139779391613977999&q-key-time=16139779391613977999&q-header-list=&q-url-param-list=&q-signature=e697e7d0419781d7c9e53a11b431f19c762084d1",
"token": "CtAAY4i5meYdojAxhMKe70QIZWAPqDUa141d7416063bda7abaa7589c13a53ff589WKQf-qgkXMET4-TnOcU2Es6s7ax5rcJZmoJ2VPNmj92JY8M4Yt9nePkuU2iiP7UQGFNkxg08A6-82uEdURyH6f9hG3DnD32-J4Dl_ZErhVJl3BdF4qy2UEfbIeAe0MPxQcOTqQskedulgaeyXbCD0ols3zwMb-3AltEhuHmTDZC-PCqCC-zqzZHzNSMHHMKfgm5G17NI14Th4-o3JeKLjY5EiUTkvhuEJyDzcI_lMEe6-nFXYuWOLy00CKFwQ__oIJNkOnMrwH5HL5DXkUwk_b8meImrlluDruz6WhU3O3h-EFHst8Zca4Jopd0WKtd8EFcK7RaJL8hKXepf1w5EJdryC4xxA6Hn41d3mzG3k"
}
# Error code
Error code | Error code | 初始值 |
---|---|---|
0 | ok | ok |
-1 | system error | The system is busy, please wait for the developer to try again |
-1000 | system error | System error |
40014 | invalid access_Token | Illegal access_Token Please take the developer seriously. access_Token Of the validity (such as whether it is expired), or to see if you are working for the appropriate Official Account message template Call interface |
40097 | invalid args | Parameter error |
40101 | missing 初始值 | Missing required parameters |
41001 | access_Token missing | lack access_Token parameter |
42001 | access_Token expired | access_Token Timeout, please check access_Token Of the validity period, please refer to the Basic Support - Obtain access_Token Middle, right. access_Token Detailed mechanism explaination of the |
43002 | require POST method | Need POST request |
44002 | empty post data | POST The packet is empty. |
47001 | data format error | analysis JSON/XML Content errorpost Missing parameters in the dataCheck for corrections and try again. |
85088 | no qbase privilege | The app is not open for cloud development |