{"id":28374,"library":"tencentcloud-sdk-python-vms","title":"TencentCloud SDK for Python - VMS","description":"The Tencent Cloud Voice Message Service (VMS) SDK for Python allows developers to integrate voice notification and verification capabilities. Current version 3.0.1459, updated frequently as part of the TencentCloud unified Python SDK.","status":"active","version":"3.0.1459","language":"python","source_language":"en","source_url":"https://github.com/TencentCloud/tencentcloud-sdk-python","tags":["tencentcloud","vms","voice","sdk","sms"],"install":[{"cmd":"pip install tencentcloud-sdk-python-vms","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"VmsClient is a separate module, not directly in the vms package.","wrong":"from tencentcloud.vms import VmsClient","symbol":"VmsClient","correct":"from tencentcloud.vms.v20200902 import vms_client"},{"note":"Models are versioned, must use the v20200902 subpackage.","wrong":"from tencentcloud.vms import models","symbol":"SendCodeVoiceRequest","correct":"from tencentcloud.vms.v20200902 import models"}],"quickstart":{"code":"from tencentcloud.common import credential\nfrom tencentcloud.vms.v20200902 import vms_client, models\n\ncred = credential.Credential(\n    os.environ.get('TENCENTCLOUD_SECRET_ID', ''),\n    os.environ.get('TENCENTCLOUD_SECRET_KEY', '')\n)\nclient = vms_client.VmsClient(cred, \"ap-guangzhou\")\nreq = models.SendCodeVoiceRequest()\nreq.CodeMessage = \"123456\"\nreq.CalledNumber = \"+861234567890\"\nresp = client.SendCodeVoice(req)\nprint(resp.RequestId)","lang":"python","description":"Sends a voice verification code using environment variables for credentials."},"warnings":[{"fix":"Use 'from tencentcloud.vms.v20200902 import vms_client, models' instead of non-versioned imports.","message":"The VMS SDK uses a versioned subpackage (v20200902). Ensure you import from the correct API version.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always pass a region string like 'ap-guangzhou' or your nearest region.","message":"The client constructor requires a region parameter, even if not all APIs use it. Missing region may cause errors.","severity":"gotcha","affected_versions":"All versions"}],"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-vms","cause":"The SDK is separated into multiple packages. Installing the parent tencentcloud-sdk-python does not include all services.","error":"ModuleNotFoundError: No module named 'tencentcloud.vms'"},{"fix":"Ensure you installed tencentcloud-sdk-python-vms and import using 'from tencentcloud.vms.v20200902 import vms_client'.","cause":"The package may not be installed or the import path is incorrect.","error":"AttributeError: module 'tencentcloud.vms' has no attribute 'v20200902'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}