通过POST、 GET 方式进行提交,数据编码采用utf-8格式,支持24小时全天查询。
https://api.ihuyi.com/idcard/idface/GetResult.json
| 参数名称 | 参数值描述 | 示例 | 类型 | 必填 |
| Content-Type | 内容类型,固定值 | application/x-www-form-urlencoded | string | 是 |
| 参数名称 | 参数值描述 | 示例 | 类型 | 必填 |
| account | APIID(用户中心【认证核验】-【身份信息验证】-【产品总览】查看) | xxxxxxxx | string | 是 |
| password | 1、APIKEY(用户中心【认证核验】-【身份信息验证】-【产品总览】查看) 2、动态密码(生成动态密码方式请看该文档末尾的说明) |
xxxxxxxxx | string | 是 |
| idcardid | 提交时接口返回的流水号 | 16236437872836 | string | 是 |
| time | Unix时间戳(10位整型数字,当使用动态密码方式时为必填) | 1623643787 | string | 否 |
| 参数名称 | 参数值描述 | 示例 | 类型 | 必返 |
| code | 返回值为2时,表示查询成功 | 2|1 | int | 是 |
| msg | 查询结果描述 | 查询成功|查询失败 | string | 是 |
| result | 认证结果 | object | 否 | |
| status | 刷脸结果状态 ING - 刷脸地址已申请 SUCCESS - 刷脸认证通过 FAIL - 刷脸认证失败 |
SUCCESS | string | |
| message | 刷脸结果描述 | 认证成功 | string | |
| livingScore | 刷脸活体检测得分 | |||
| similarity | 刷脸照片相似度得分 | 100 | string |
| code | msg |
| 0 | 未知错误 |
| 2 | 查询成功 |
| 400 | 非法ip访问 |
| 401 | 帐号不能为空 |
| 402 | 密码不能为空 |
| 403 | 应用不存在 |
| 405 | API ID 或 API KEY 不正确 |
| 4050 | 账号被冻结 |
| 40501 | 动态密码已过期 |
| 40502 | 动态密码校验失败 |
| 40505 | 没有签定合同 |
| 4051 | 动态密码校验失败 |
| 4052 | 访问ip与备案ip不符 |
| 4060 | 流水号不能为空 |
| 4061 | 数据不存在 |
https://api.ihuyi.com/idcard/idface/GetResult.json?account=xxxxxxxx&password=xxxxxxxxx&idcardid=16236437872836&
示例(成功)
<?xml version="1.0" encoding="utf-8"?><GetResultResult><code>2</code><msg>查询成功</msg><result><status>SUCCESS</status><message>认证成功</message><livingScore></livingScore><similarity>100</similarity></result></GetResultResult>
{ "code":
2
, "msg":
"查询成功"
, "result":
{ "status":
"SUCCESS"
, "message":
"认证成功"
, "livingScore":
""
, "similarity":
"100"
}
}
示例(失败)
<?xml version="1.0" encoding="utf-8"?><GetResultResult><code>1</code><msg>查询失败</msg></GetResultResult> {"code":1,"msg":"查询失败"}
$account = 'xxxxxxxx';
$password = 'xxxxxxxxx';
$app = 'idface'; //固定值
$name = '';
$id_card_no = '';
$time = '1623643787';
$password=md5($account.$password.$app.$name.$id_card_no.$time);
$password=md5('xxxxxxxxxxxxxxxxxidface1623643787');
//注意:所有字符编码统一为UTF-8
服务热线:
4008 808 898
服务热线(工作时间):
4008 808 898
业务咨询(非工作时间):
售后咨询(非工作时间):
