Tencent Cloud Tiw SDK

raw JSON →
3.1.59 verified Sat May 09 auth: no python

The Tencent Cloud Tiw SDK for Python provides access to Tencent Interactive Whiteboard (TIW) services. Version 3.1.59 is the latest stable release. The package is part of the larger tencentcloud-sdk-python ecosystem and follows the same release cadence as other Tencent Cloud SDK modules.

pip install tencentcloud-sdk-python-tiw
error ModuleNotFoundError: No module named 'tencentcloud'
cause The base tencentcloud-sdk-python-common package is not installed.
fix
pip install tencentcloud-sdk-python-common
error tencentcloud.common.exception.TencentCloudSDKException: [TencentCloudSDKException] code: UnsupportedOperation, message: The requested API version is not supported
cause The API version (e.g., v20190919) is not supported for the specific TIW operation.
fix
Update to the latest API version: check the Tencent Cloud documentation and adjust the import path accordingly (e.g., v20200903).
breaking The import path changed between SDK v2 and v3. In v2, you could import directly from tencentcloud.tiw; in v3, you must include the version subpackage (v20190919).
fix Use from tencentcloud.tiw.v20190919 import tiw_client, models
deprecated The DescribeWhiteboardPushRequest and similar request objects are deprecated in favor of new request models in later API versions (e.g., v20200903?). Check the latest API documentation.
fix Use the latest request models from the appropriate version subpackage.
gotcha Region selection matters: the Tiw API may not be available in all regions. Using an unsupported region will cause a client error.
fix Verify supported regions in the Tencent Cloud documentation; typically 'ap-guangzhou', 'ap-shanghai', etc.

Initialize the Tiw client and call DescribeWhiteboardPush as an example.

import os
from tencentcloud.common import credential
from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException
from tencentcloud.tiw.v20190919 import tiw_client, models

try:
    cred = credential.Credential(
        os.environ.get('TENCENTCLOUD_SECRET_ID', ''),
        os.environ.get('TENCENTCLOUD_SECRET_KEY', '')
    )
    client = tiw_client.TiwClient(cred, 'ap-guangzhou')
    req = models.DescribeWhiteboardPushRequest()
    req.SdkAppId = 'your_sdkappid'
    req.TaskId = 'your_task_id'
    resp = client.DescribeWhiteboardPush(req)
    print(resp.to_json_string())
except TencentCloudSDKException as err:
    print(err)