一、什么是身份证实名认证接口?

 传入姓名、身份证号,核验二要素是否一致,返回生日、性别、籍贯等信息。

二、关于实名制的几个常见疑问解答

实名制会泄露个人信息吗?

答:不会。
相反,实名制推动了更严格的信息管理制度。所有涉及用户敏感信息的操作都需经过加密传输、权限控制与审计追踪,整体信息安全水平反而比非实名状态更高。

运营商会不会因为实名制导致收入下降?

答:短期有成本增加,长期利好明显。
虽然实名制会提高用户注册门槛,短期内可能影响新增用户数量,但从长远看,它提升了用户质量,有利于精准营销与客户生命周期管理,反而是运营商数字化转型的重要推手。

三、如何用C#进行调用?

接口地址:https://market.aliyun.com/apimarket/detail/cmapi00067376
//using System.IO;
//using System.Text;
//using System.Net;
//using System.Net.Security;
//using System.Security.Cryptography.X509Certificates;

        private const String host = "https://tscheck2.market.alicloudapi.com";
        private const String path = "/idcard";
        private const String method = "GET";
        private const String appcode = "你自己的AppCode";

        static void Main(string[] args)
        {
            String querys = "name=%E5%BC%A0%E4%B8%89&idcard=330333333333333333";
            String bodys = "";
            String url = host + path;
            HttpWebRequest httpRequest = null;
            HttpWebResponse httpResponse = null;

            if (0 < querys.Length)
            {
                url = url + "?" + querys;
            }

            if (host.Contains("https://"))
            {
                ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
                httpRequest = (HttpWebRequest)WebRequest.CreateDefault(new Uri(url));
            }
            else
            {
                httpRequest = (HttpWebRequest)WebRequest.Create(url);
            }
            httpRequest.Method = method;
            httpRequest.Headers.Add("Authorization", "APPCODE " + appcode);
            if (0 < bodys.Length)
            {
                byte[] data = Encoding.UTF8.GetBytes(bodys);
                using (Stream stream = httpRequest.GetRequestStream())
                {
                    stream.Write(data, 0, data.Length);
                }
            }
            try
            {
                httpResponse = (HttpWebResponse)httpRequest.GetResponse();
            }
            catch (WebException ex)
            {
                httpResponse = (HttpWebResponse)ex.Response;
            }

            Console.WriteLine(httpResponse.StatusCode);
            Console.WriteLine(httpResponse.Method);
            Console.WriteLine(httpResponse.Headers);
            Stream st = httpResponse.GetResponseStream();
            StreamReader reader = new StreamReader(st, Encoding.GetEncoding("utf-8"));
            Console.WriteLine(reader.ReadToEnd());
            Console.WriteLine("\n");

        }

        public static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
        {
            return true;
        }

成功响应返回代码示例:

{
    "code": 1,
    "msg": "操作成功",
    "data": {
        "name": "", //姓名
        "idcard": "", //身份证号
        "res": "2",  //核验结果状态码,1 一致;2 不一致;3 无记录
        "description": "不一致", //核验结果状态描述
        "sex": "男",
        "birthday": "19660413",
        "address": "河南省郑州市金水区"
    }
}

Logo

网易易盾是国内领先的数字内容风控服务商,依托网易二十余年的先进技术和一线实践经验沉淀,为客户提供专业可靠的安全服务,涵盖内容安全、业务安全、应用安全、安全专家服务四大领域,全方位保障客户业务合规、稳健和安全运营。

更多推荐