Skip to content

Commit 43a2bec

Browse files
jerryshialmazuel
andauthored
Fix Communication Call Automation Readme issue (#34114)
* Update README.md * Update README.md * Update README.md --------- Co-authored-by: Laurent Mazuel <[email protected]>
1 parent 547d35c commit 43a2bec

File tree

1 file changed

+5
-3
lines changed
  • sdk/communication/azure-communication-callautomation

1 file changed

+5
-3
lines changed

sdk/communication/azure-communication-callautomation/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_
1010

1111
## Getting started
1212
### Prerequisites
13-
- Python 3.7 or later is required to use this package.
13+
- Python 3.8 or later is required to use this package.
1414
- You need an [Azure subscription][azure_sub] to use this package.
1515
- A deployed Communication Services resource. You can use the [Azure Portal][azure_portal] or the [Azure PowerShell][azure_powershell] to set it up.
1616

@@ -32,11 +32,13 @@ pip install azure-communication-callautomation
3232
## Examples
3333
### Initialize CallAutomationClient
3434
```Python
35+
from azure.identity import DefaultAzureCredential
3536
from azure.communication.callautomation import (CallAutomationClient)
3637

3738
# Your unique Azure Communication service endpoint
3839
endpoint_url = '<ENDPOINT>'
39-
client = CallAutomationClient.from_connection_string(endpoint_url)
40+
credential = DefaultAzureCredential()
41+
client = CallAutomationClient(endpoint_url, credential)
4042
```
4143

4244
### Create Call
@@ -55,7 +57,7 @@ callback_url = "https://<MY-EVENT-HANDLER-URL>/events"
5557
# send out the invitation, creating call
5658
result = client.create_call(
5759
target_participant=user,
58-
callback_url=callback_uri
60+
callback_url=callback_url
5961
)
6062

6163
# this id can be used to do further actions in the call

0 commit comments

Comments
 (0)