From 43a2becfda45bcbc6f8649c059e07be8f3cddf86 Mon Sep 17 00:00:00 2001 From: "Jinlong Shi (MSFT)" <139106314+jerryshia@users.noreply.github.com> Date: Wed, 24 Jul 2024 02:34:26 +0800 Subject: [PATCH] Fix Communication Call Automation Readme issue (#34114) * Update README.md * Update README.md * Update README.md --------- Co-authored-by: Laurent Mazuel --- .../azure-communication-callautomation/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sdk/communication/azure-communication-callautomation/README.md b/sdk/communication/azure-communication-callautomation/README.md index 26d2c84176c..651a74be72a 100644 --- a/sdk/communication/azure-communication-callautomation/README.md +++ b/sdk/communication/azure-communication-callautomation/README.md @@ -10,7 +10,7 @@ refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_ ## Getting started ### Prerequisites -- Python 3.7 or later is required to use this package. +- Python 3.8 or later is required to use this package. - You need an [Azure subscription][azure_sub] to use this package. - A deployed Communication Services resource. You can use the [Azure Portal][azure_portal] or the [Azure PowerShell][azure_powershell] to set it up. @@ -32,11 +32,13 @@ pip install azure-communication-callautomation ## Examples ### Initialize CallAutomationClient ```Python +from azure.identity import DefaultAzureCredential from azure.communication.callautomation import (CallAutomationClient) # Your unique Azure Communication service endpoint endpoint_url = '' -client = CallAutomationClient.from_connection_string(endpoint_url) +credential = DefaultAzureCredential() +client = CallAutomationClient(endpoint_url, credential) ``` ### Create Call @@ -55,7 +57,7 @@ callback_url = "https:///events" # send out the invitation, creating call result = client.create_call( target_participant=user, - callback_url=callback_uri + callback_url=callback_url ) # this id can be used to do further actions in the call