{"id":27999231,"url":"https://github.com/voximplant/apiclient-python","last_synced_at":"2025-07-18T14:42:51.225Z","repository":{"id":77510720,"uuid":"190034825","full_name":"voximplant/apiclient-python","owner":"voximplant","description":"Voximplant Management API Python client library","archived":false,"fork":false,"pushed_at":"2025-04-21T09:55:40.000Z","size":190,"stargazers_count":9,"open_issues_count":1,"forks_count":3,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-08T22:57:10.297Z","etag":null,"topics":["management-api","voximplant"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voximplant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-06-03T15:42:07.000Z","updated_at":"2025-04-21T09:55:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"a685f808-5245-4b53-90a3-e686acab4bc8","html_url":"https://github.com/voximplant/apiclient-python","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voximplant%2Fapiclient-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voximplant%2Fapiclient-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voximplant%2Fapiclient-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voximplant%2Fapiclient-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voximplant","download_url":"https://codeload.github.com/voximplant/apiclient-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253160791,"owners_count":21863627,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["management-api","voximplant"],"created_at":"2025-05-08T22:57:21.242Z","updated_at":"2025-07-18T14:42:51.215Z","avatar_url":"https://github.com/voximplant.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Voximplant API client library\n\n#### Version 2.2.0\n\n## Prerequisites\n\nIn order to use the Voximplant Python SDK, you need the following:\n\n1. A developer account. If you don't have one, [sign up here](https://voximplant.com/sign-up/).\n1. A private API key. There are 2 options to obtain it:\n    1. Either generate it in the [Voximplant Control panel](https://manage.voximplant.com/settings/service_accounts)\n    1. Or call the [CreateKey](https://voximplant.com/docs/references/httpapi/managing_role_system#createkey) HTTP API\n       method with the\n       specified [authentication parameters](https://voximplant.com/docs/references/httpapi/auth_parameters). You'll\n       receive a response with the __result__ field in it. Save the __result__ value in a file (since we don't store the\n       keys, save it securely on your side).\n1. Python 2.x or 3.x runtime with `pip` and `setuptools`\u003e=18.5 installed\n\n## How to use\n\nGo to your project folder and install the SDK using `pip`:\n\n```bash \npython -m pip install --user voximplant-apiclient\n```\n\nThen import the SDK in your script\n\n```python\nfrom voximplant.apiclient import VoximplantAPI\n```\n\nNext, specify the path to the JSON service account file either in the constructor or using the environment.\n\n__constructor__:\n\n```python\napi = VoximplantAPI(\"/path/to/credentials.json\")\n```\n\n__env__:\n\n```bash\nexport VOXIMPLANT_CREDENTIALS=/path/to/credentials.json\n```\n\n## Examples\n\n### Start a scenario\n\n```python\nfrom voximplant.apiclient import VoximplantAPI, VoximplantException\n\nif __name__ == \"__main__\":\n    api = VoximplantAPI(\"credentials.json\")\n\n    # Start a scenario of the user 1\n\n    RULE_ID = 1\n    SCRIPT_CUSTOM_DATA = \"mystr\"\n    USER_ID = 1\n\n    try:\n        res = api.start_scenarios(RULE_ID, script_custom_data=SCRIPT_CUSTOM_DATA, user_id=USER_ID)\n        print(res)\n    except VoximplantException as e:\n        print(\"Error: {}\".format(e.message))\n```\n\n### Send an SMS\n\n```python\nfrom voximplant.apiclient import VoximplantAPI, VoximplantException\n\nif __name__ == \"__main__\":\n    api = VoximplantAPI(\"credentials.json\")\n\n    # Send the SMS with the \"Test message\" text from the phone number 447443332211 to the phone number 447443332212\n\n    SOURCE = \"447443332211\"\n    DESTINATION = \"447443332212\"\n    SMS_BODY = \"Test message\"\n\n    try:\n        res = api.send_sms_message(SOURCE, DESTINATION, SMS_BODY)\n        print(res)\n    except VoximplantException as e:\n        print(\"Error: {}\".format(e.message))\n```\n\n### Get a call history item\n\n```python\nfrom voximplant.apiclient import VoximplantAPI, VoximplantException\nimport pytz\nimport datetime\n\nif __name__ == \"__main__\":\n    api = VoximplantAPI(\"credentials.json\")\n\n    # Get the first call session history record from the 2012-01-01 00:00:00 UTC to the 2014-01-01 00:00:00 UTC\n\n    FROM_DATE = datetime.datetime(2012, 1, 1, 0, 0, 0, pytz.utc)\n    TO_DATE = datetime.datetime(2014, 1, 1, 0, 0, 0, pytz.utc)\n    COUNT = 1\n\n    try:\n        res = api.get_call_history(FROM_DATE, TO_DATE, count=COUNT)\n        print(res)\n    except VoximplantException as e:\n        print(\"Error: {}\".format(e.message))\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoximplant%2Fapiclient-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoximplant%2Fapiclient-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoximplant%2Fapiclient-python/lists"}