开通阿里云的实人认证,可以按次数收费,也可买流量包
uniapp的原生插件下载地址:https://cn-shanghai-aliyun-cloudauth.oss-cn-shanghai.aliyuncs.com/cloudauth_sdk/identity_platform/UniApp/IdentityPlatformUniPlugin-20221108.zip



前端代码
//加载增强版实人认证插件。
const verifyPlugin = uni.requireNativePlugin('IdentityPlatformUniPlugin');
export default {
onLoad() {
//调用getMetaInfo获取MetaInfo数据。
var metaInfo = verifyPlugin.getMetaInfo();
console.log(metaInfo);
}
}
增强版实人认证服务代码示例:
verifyPlugin.faceVerify({
"certifyId":"xxx" //填写从服务端获取的CertifyId。
}, function(response){
});
//response返回格式。
{
code:1000, //错误码。
message:认证通过, //错误码描述。
deviceToken:xxx, //设备Token(如果
}后端sdk
参考文档:https://help.aliyun.com/zh/id-verification/enhanced-id-verification/developer-reference/server-side-integration-12
网友回复


