def MinorsVerification(self, request):
        """未成年人守护接口是通过传入手机号或姓名和身份证号,结合权威数据源和腾讯健康守护可信模型,判断该信息是否真实且年满18周岁。腾讯健康守护可信模型覆盖了上十亿手机库源,覆盖率高、准确率高,如果不在库中的手机号,还可以通过姓名+身份证进行兜底验证。

        :param request: Request instance for MinorsVerification.
        :type request: :class:`tencentcloud.faceid.v20180301.models.MinorsVerificationRequest`
        :rtype: :class:`tencentcloud.faceid.v20180301.models.MinorsVerificationResponse`

        """
        try:
            params = request._serialize()
            body = self.call("MinorsVerification", params)
            response = json.loads(body)
            if "Error" not in response["Response"]:
                model = models.MinorsVerificationResponse()
                model._deserialize(response["Response"])
                return model
            else:
                code = response["Response"]["Error"]["Code"]
                message = response["Response"]["Error"]["Message"]
                reqid = response["Response"]["RequestId"]
                raise TencentCloudSDKException(code, message, reqid)
        except Exception as e:
            if isinstance(e, TencentCloudSDKException):
                raise
            else:
                raise TencentCloudSDKException(e.message, e.message)
예제 #2
0
    def MinorsVerification(self, request):
        """传入手机号或者姓名和身份证号,判断该信息是否已实名认证且年满18周岁。

        :param request: 调用MinorsVerification所需参数的结构体。
        :type request: :class:`tencentcloud.faceid.v20180301.models.MinorsVerificationRequest`
        :rtype: :class:`tencentcloud.faceid.v20180301.models.MinorsVerificationResponse`

        """
        try:
            params = request._serialize()
            body = self.call("MinorsVerification", params)
            response = json.loads(body)
            if "Error" not in response["Response"]:
                model = models.MinorsVerificationResponse()
                model._deserialize(response["Response"])
                return model
            else:
                code = response["Response"]["Error"]["Code"]
                message = response["Response"]["Error"]["Message"]
                reqid = response["Response"]["RequestId"]
                raise TencentCloudSDKException(code, message, reqid)
        except Exception as e:
            if isinstance(e, TencentCloudSDKException):
                raise
            else:
                raise TencentCloudSDKException(e.message, e.message)