【iOS 接口对接】身份核验实名API接口返回值参数与状态码说明

身份证核验API广泛应用于金融风控、在线教育、医疗健康、共享经济等领域。例如,在金融风控中,可以快速验证用户身份,降低信贷风险;在在线教育中,确保学员身份信息准确无误,满足教育政策要求。该功能接口一般由第三方平台来提供,如翔云、阿里云等。

身份证实名认证接口返回值参数说明:

|----|----------------------|--------|---|---|
| 序号 | 名称 | 类型 | 说明 ||
| 1 | verify_result_status | String | 身份信息核验结果 1:判定为同一人 2:判定为不同人 3:不确定是否为同一人 4:姓名与身份号码不匹配 5:库中无照片 6:库中无此号 7:图片不合格 8:姓名、身份证号码格式不规范 ||
| 2 | verify_similarity | String | 比对值 0 < verify_similarity ≤ 60:判定为不同人 60 < verify_similarity ≤ 70:不确定是否为同一人 70 < verify_similarity:判定为同一人 ||

身份证实名认证接口状态码说明:

|---|---|------|---|---|
| status || code | message ||
| status || 0 | 调用成功(扣费) ||
| status || 400 | 参数缺失 ||
| status || 410 | 参数无法解析 ||
| status || 420 | 传入参数错误 ||
| status || 999 | 服务器错误 ||

iOS身份核验对接示例:

复制代码
import Alamofire

class Sample {

    func performNetworkRequest() {
        let parameters: [String: Any] = [
            "img": "/9j",
            "key": "M***********g",
            "secret": "3***********6",
            "typeId": "3013",
            "trueName": "陈**",
            "idenNo": "13***************3",
            "format": "json"
        ]

        AF.request("https://netocr.com/verapi/veridenOrd.do", method: .post, parameters: parameters)
            .response { response in
                switch response.result {
                case .success(let responseData):
                    if let data = responseData {
                        let responseString = String(data: data, encoding: .utf8)
                        print("Response: \(responseString ?? "")")
                    }
                case .failure(let error):
                    print("Error: \(error.localizedDescription)")
                }
            }
    }
}
let sample = Sample()
sample.performNetworkRequest()
相关推荐
RollingPin1 天前
iOS八股文之 RunLoop
ios·多线程·卡顿·ios面试·runloop·ios保活·ios八股文
2501_916007471 天前
iOS 混淆工具链实战,多工具组合完成 IPA 混淆与加固(iOS混淆|IPA加固|无源码混淆|App 防反编译)
android·ios·小程序·https·uni-app·iphone·webview
LinXunFeng1 天前
Flutter webview 崩溃率上升怎么办?我的分析与解决方案
flutter·ios·webview
游戏开发爱好者81 天前
FTP 抓包分析实战,命令、被动主动模式要点、FTPS 与 SFTP 区别及真机取证流程
运维·服务器·网络·ios·小程序·uni-app·iphone
Nick56831 天前
Xcode16 避坑
ios
ii_best1 天前
IOS/ 安卓开发工具按键精灵Sys.GetAppList 函数使用指南:轻松获取设备已安装 APP 列表
android·开发语言·ios·编辑器
2501_915909061 天前
iOS 26 文件管理实战,多工具组合下的 App 数据访问与系统日志调试方案
android·ios·小程序·https·uni-app·iphone·webview
hweiyu001 天前
苹果iOS开发零基础特训(视频教程)
ios
2501_915918412 天前
掌握 iOS 26 App 运行状况,多工具协作下的监控策略
android·ios·小程序·https·uni-app·iphone·webview