POST /api/v1/shares/{token}/verify
POST
/api/v1/shares/{token}/verify校验分享密码(成功后返回资产与签名媒体 URL)
请求参数
| 名称 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
token | string | path | 是 | — |
请求体
请求数据
Content-Type · application/json
{
"type": "object",
"required": [
"password"
],
"properties": {
"password": {
"type": "string"
}
}
}请求示例
cURL
curl -X POST 'http://localhost:8080/api/v1/shares/{token}/verify' \
-H 'Accept: application/json'JavaScript
const res = await fetch('http://localhost:8080/api/v1/shares/{token}/verify', {
method: 'POST',
headers: {
'Accept': 'application/json'
},
});
const data = await res.json();Python
import requests
res = requests.post(
'http://localhost:8080/api/v1/shares/{token}/verify',
headers={'Accept': 'application/json'}
)
print(res.json())响应
200成功
application/json
{
"type": "object",
"description": "通用响应包装",
"properties": {
"code": {
"type": "string",
"example": "ok"
},
"message": {
"type": "string",
"example": "ok"
},
"data": {}
}
}401未认证或凭据无效
application/json
{
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "not_found"
},
"message": {
"type": "string",
"example": "资源不存在"
}
}
}404资源不存在
application/json
{
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "not_found"
},
"message": {
"type": "string",
"example": "资源不存在"
}
}
}429验证尝试过多
在线调试
在线调试
凭证仅保存在当前页面内存中自定义请求 Header
