产品详情
API参数 云鉴静默活体检测_实人认证_人脸认证_人证比对_人脸比对_人脸识别_公安库权威人像比对_活体认证 调用地址: http,https://jmht.api.bdymkt.com/jingmohuoti 请求方式: POST 支持格式: application/x-www-form-urlencoded 调用工具: 去调试 请求参数(Headers) 请求参数(Query) 请求参数(Body)
- 名称
- 类型
- 是否必须
- 示例值
- 描述
- photo
- string
- true
- --
- 人像照片(Base64字符串:不含img标签信息"data:image/jpg;base64,"),要求图像文件大小在100KB左右
<dependency>
<groupId>com.baidubce</groupId>
<artifactId>api-explorer-sdk</artifactId>
<version>1.0.0</version>
</dependency>
import com.baidubce.http.ApiExplorerClient;
import com.baidubce.http.AppSigner;
import com.baidubce.http.HttpMethodName;
import com.baidubce.model.ApiExplorerRequest;
import com.baidubce.model.ApiExplorerResponse;
// 静默活体检测SDK人像比对 Java示例代码
public class RequestDemo {
public static void main(String[] args) {
String path = "//jingmohuoti";
ApiExplorerRequest request = new ApiExplorerRequest(HttpMethodName.POST, path);
request.setCredentials("您的 access key", "您的 secret key");
request.addHeaderParameter("Content-Type", "application/x-www-form-urlencoded");
ApiExplorerClient client = new ApiExplorerClient(new AppSigner());
try {
ApiExplorerResponse response = client.sendRequest(request);
// 返回结果格式为Json字符串
System.out.println(response.getResult());
} catch (Exception e) {
e.printStackTrace();
}
}
}
点击复制代码
正常返回示例 {
"jobid": "ZT20201222113453286136129",
"responsetime": "20201222113454004",
"errcode": "00000",
"errmsg": "通过活体检测"
}
errcode 响应码
00000 通过活体检测
00001 未通过活体检测
00002 图像为空
00003 未检测到脸
00004 去除眼部遮挡
00005 保持人脸端正
00006 去除鼻子遮挡
00007 去除嘴部遮挡
00008 只允许出现一个人
21089 请求流水号重复
910RE 系统交易超时
91096 系统其他错误
失败返回示例 {
"jobid": "ZT20201222113453286136378",
"responsetime": "20201222113458001",
"errcode": "00004",
"errmsg": "去除眼部遮挡"
}
错误码定义
