{"id":5516,"library":"telesignenterprise","title":"Telesign Enterprise SDK","description":"The TeleSign Enterprise SDK for Python simplifies integration with TeleSign's APIs for phone verification, SMS messaging, and fraud prevention services. It allows developers to quickly add security and communication features to their applications. The current version is 4.0.1, and the library maintains an active development status with updates primarily released to support new TeleSign API features, address critical bugs, or incorporate breaking changes from their backend services.","status":"active","version":"4.0.1","language":"en","source_language":"en","source_url":"https://github.com/telesign/python_telesign","tags":["telecom","sms","verification","fraud-prevention","api-client","telesign"],"install":[{"cmd":"pip install telesignenterprise","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"note":"The top-level package is `telesign`, not `telesignenterprise`, even though the PyPI package is named `telesignenterprise`.","wrong":"from telesignenterprise.rest import RestClient","symbol":"RestClient","correct":"from telesign.rest import RestClient"},{"note":"Utility functions are available under `telesign.util`.","symbol":"TeleSignUtils","correct":"from telesign.util import TeleSignUtils"}],"quickstart":{"code":"import os\nfrom telesign.rest import RestClient\n\nCUSTOMER_ID = os.environ.get('TELE_CUSTOMER_ID', 'YOUR_CUSTOMER_ID')\nAPI_KEY = os.environ.get('TELE_API_KEY', 'YOUR_API_KEY')\nPHONE_NUMBER = os.environ.get('TELE_PHONE_NUMBER', '+1234567890') # E.164 format\n\nif __name__ == '__main__':\n    if CUSTOMER_ID == 'YOUR_CUSTOMER_ID' or API_KEY == 'YOUR_API_KEY' or PHONE_NUMBER == '+1234567890':\n        print(\"Please set TELE_CUSTOMER_ID, TELE_API_KEY, and TELE_PHONE_NUMBER environment variables or replace placeholders.\")\n    else:\n        try:\n            telesign_client = RestClient(CUSTOMER_ID, API_KEY)\n            # Example: Send an SMS message\n            response = telesign_client.sms.message(PHONE_NUMBER, \"Hello from TeleSign!\", message_type=\"ARN\")\n\n            if response.status_code == 200:\n                print(f\"SMS message sent successfully: {response.json()}\")\n            else:\n                print(f\"Failed to send SMS message: {response.status_code} - {response.json()}\")\n\n            # Example: Check PhoneID (basic)\n            phoneid_response = telesign_client.phoneid.standard(PHONE_NUMBER, {}) # Second arg is optional 'ucid'\n            if phoneid_response.status_code == 200:\n                print(f\"PhoneID Standard lookup successful: {phoneid_response.json()}\")\n            else:\n                print(f\"Failed PhoneID Standard lookup: {phoneid_response.status_code} - {phoneid_response.json()}\")\n\n        except Exception as e:\n            print(f\"An error occurred: {e}\")","lang":"python","description":"This quickstart demonstrates how to initialize the `RestClient` with your TeleSign Customer ID and API Key (preferably from environment variables) and then use it to send an SMS message and perform a PhoneID lookup. Ensure you replace the placeholder values or set corresponding environment variables."},"warnings":[{"fix":"Migrate any existing code using Legacy Intelligence Use Case API or App Verify SDK to the latest TeleSign APIs and methods. Refer to TeleSign's official documentation for updated API endpoints and recommended practices.","message":"Version 3.0.0 removed all functionality and methods related to the Legacy Intelligence Use Case API and the App Verify SDK. Code using these deprecated APIs will no longer work.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Review TeleSign's documentation for Intelligence Cloud to ensure your implementation utilizes the latest recommended endpoints and patterns introduced in v4.0.0.","message":"Version 4.0.0 introduced support for a new Intelligence Cloud endpoint. While backward compatibility might exist for some older endpoints, relying on previous Intelligence Cloud implementations after this update may lead to unexpected behavior or require refactoring to use the new endpoint.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Always use `from telesign import ...` for importing modules and classes, for example `from telesign.rest import RestClient`.","message":"The PyPI package name is `telesignenterprise`, but the primary Python package to import from is `telesign`. Importing directly from `telesignenterprise` will result in an `ImportError` for core modules like `rest` or `util`.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure you are using `telesignenterprise` version 4.0.1 or newer to avoid `pkg_resources` related issues, especially when working with modern Python environments and `setuptools` versions.","message":"Older versions of the SDK (e.g., prior to 4.0.1 and 3.0.1) had issues with `pkg_resources` in newer Python environments, potentially leading to build or runtime errors related to setuptools.","severity":"gotcha","affected_versions":"<3.0.1, <4.0.1"}],"env_vars":null,"last_verified":"2026-04-13T00:00:00.000Z","next_check":"2026-07-12T00:00:00.000Z"}