{"id":28335,"library":"tencentcloud-sdk-python-faceid","title":"Tencent Cloud FaceID SDK for Python","description":"Official Tencent Cloud SDK for FaceID, providing facial recognition and liveness detection APIs. Current version 3.1.80. Releases follow Tencent Cloud SDK cadence, typically bi-weekly.","status":"active","version":"3.1.80","language":"python","source_language":"en","source_url":"https://github.com/TencentCloud/tencentcloud-sdk-python","tags":["tencentcloud","faceid","face recognition","liveness detection","sdk"],"install":[{"cmd":"pip install tencentcloud-sdk-python-faceid","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Common client and credential classes","package":"tencentcloud-sdk-python-common","optional":false}],"imports":[{"note":"Module version in path (v20180301) is required, else ImportError.","wrong":"from tencentcloud.faceid import FaceidClient","symbol":"FaceidClient","correct":"from tencentcloud.faceid.v20180301 import faceid_client"},{"note":"Models must be imported from the versioned subpackage.","wrong":"from tencentcloud.faceid.models import DetectAuthRequest","symbol":"DetectAuthRequest","correct":"from tencentcloud.faceid.v20180301 import models as faceid_models"}],"quickstart":{"code":"from tencentcloud.common import credential\nfrom tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException\nfrom tencentcloud.faceid.v20180301 import faceid_client, models\n\nsecret_id = os.environ.get('TENCENTCLOUD_SECRET_ID', '')\nsecret_key = os.environ.get('TENCENTCLOUD_SECRET_KEY', '')\ncred = credential.Credential(secret_id, secret_key)\nclient = faceid_client.FaceidClient(cred, \"ap-guangzhou\")\nreq = models.DetectAuthRequest()\nreq.RuleId = \"your_rule_id\"\ntry:\n    resp = client.DetectAuth(req)\n    print(resp.to_json_string())\nexcept TencentCloudSDKException as e:\n    print(e)    ","lang":"python","description":"Initialize client and call DetectAuth (face verification). Requires credentials and RuleId from Tencent Cloud console."},"warnings":[{"fix":"Use from tencentcloud.faceid.v20180301 import faceid_client, models","message":"The SDK v3 major restructuring moved versioned subpackages; imports without v20180301 will fail.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Pass region as second argument; endpoint is optional.","message":"Old method `FaceidClient.__init__` without endpoint parameter is deprecated. Use `client = FaceidClient(cred, region, endpoint)` or default endpoint.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Always specify a region string (e.g., 'ap-guangzhou').","message":"Region parameter is required but many users omit it, causing client initialization failure.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"pip install tencentcloud-sdk-python-common tencentcloud-sdk-python-faceid","cause":"Missing pip install tencentcloud-sdk-python-faceid, or missing common dependency.","error":"ModuleNotFoundError: No module named 'tencentcloud.faceid'"},{"fix":"Use from tencentcloud.faceid.v20180301 import faceid_client","cause":"Old style import without version subpackage; SDK v3 requires version in path.","error":"AttributeError: module 'tencentcloud.faceid' has no attribute 'v20180301'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}