文档
测试

下载已添加水印的文档

GET
http://foxconn.gateway.api.liyueyun.com/api/watermark/download/:fileId

接口描述

如果添加水印接口query中添加了参数 cb=url 将只返回 fileId,使用此接口可单独下载,文件有效期1天,过期后将会清除

Path Variables

参数名
类型
描述
必填
fileId
string
要下载的文件id。示例: ZjAyZTc1NDItNWU5Zi00MDg4LWI5U4LnBu
必填

请求头

参数名
类型
描述
必填
Authorization
string
示例:Bearer a4ej3APoltdSZYiE
必填

Response

<文件二进制>

说明 / 示例

#### 错误列表 |httpCode|error|message| |-|-|-| |401|AccessTokenNoExist|必须有 accessToken| |401|AccessTokenIsInvalid|无效的 accessToken| |401|AccessTokenHasExpired|accessToken 已过期| |403|SecretIsInvalid|无效的 secret| |403|SecretHasDisabled|secret 已被禁用| |403|SecretError|secret 状态异常| |403|LimitExceeded|已超出用量限制| #### 示例代码 ##### C#访问示例代码: ~~~CSharp var client = new RestClient("http://foxconn.gateway.api.liyueyun.com/api/watermark/download/ZjAyZTc1NDItNWU5Zi00MDg4LWI5U4LnBu"); client.Timeout = -1; var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer a5hmcP2AnRQyBDgv"); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); ~~~ # ##### Java访问示例代码: ~~~ java OkHttpClient client = new OkHttpClient().newBuilder() .build(); Request request = new Request.Builder() .url("http://foxconn.gateway.api.liyueyun.com/api/watermark/download/ZjAyZTc1NDItNWU5Zi00MDg4LWI5U4LnBu") .method("GET", null) .addHeader("Authorization", "Bearer a5hmcP2AnRQyBDgv") .build(); Response response = client.newCall(request).execute(); ~~~ # #### Nodejs访问示例代码 ~~~javascript var axios = require('axios'); var config = { method: 'get', url: 'http://foxconn.gateway.api.liyueyun.com/api/watermark/download/ZjAyZTc1NDItNWU5Zi00MDg4LWI5U4LnBu', headers: { 'Authorization': 'Bearer a5hmcP2AnRQyBDgv' } }; axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); }) .catch(function (error) { console.log(error); }); ~~~