接口URL
https://api.polyv.net/v2/video/{userid}/audit-video
接口说明
支持格式
请求方式
请求数限制
请求参数
JSON示例
{
code: 200,
status: "success",
message: "success",
data: ""
}
{
code: 400,
status: "error",
message: "vid不能为空",
data: ""
}
{
code: 400,
status: "error",
message: "reviewResult不能为空",
data: ""
}
{
code: 400,
status: "error",
message: "reviewResult值不对",
data: ""
}
{
code: 400,
status: "error",
message: "视频ID和用户不对应",
data: ""
}
{
code: 400,
status: "error",
message: "账号没有操作该接口的权限",
data: ""
}
{
code: 400,
status: "error",
message: "视频不存在",
data: ""
}
{
code: 400,
status: "error",
message: "只有审核不通过的视频才可以修改审核状态",
data: ""
}
{
code: 400,
status: "error",
message: "视频被判定为确认违规,无法修改审核状态,如有疑问请联系客服处理",
data: ""
}
字段说明
php请求示例
<?php
$userid="8f8482aaab";
$secretkey="AiDQw1mAmi";
$vid="8f8482aaab8fe7ea12e3314a11a061fc_8";
$reviewResult="pass";
$ptime=time()*1000;
$str="ptime=$ptime&reviewResult=$reviewResult&vid=$vid".$secretkey;
$sign=strtoupper(sha1($str));
$url="http://api.polyv.net/v2/video/$userid/audit-video?ptime=$ptime&reviewResult=$reviewResult&vid=$vid&sign=$sign";
$content = file_get_contents($url);
echo $content;
?>
签名规则
将请求参数(sign除外)按照参数名字典顺序排列,用“&”连接参数名与参数值,并在最后加上secretkey的值,生成40位大写的SHA1值,作为sign。
以下是示例过程:
1. 将请求参数按照参数名字典顺序排列为:
reviewResult="pass"
ptime="1476753635000";
vid="8f8482aaab8fe7ea12e3314a11a061fc_8";
2. 连接字符串 用“&”连接参数名与参数值,并在最后加上secretkey的值,生成40位大写的SHA1值,作为sign(本示例的值为AiDQw1mAmi),如下:
ptime=1476753635000&reviewResult=pass&vid=8f8482aaab8fe7ea12e3314a11a061fc_8AiDQw1mAmi
3. 生成签名sign
sign为40位大写的SHA1值:
B2E2D7AAB9DFCC8CBFE7EDC919B5F8F6F4E104BC