Skip to content

Commit 622b1e8

Browse files
authored
Addressed issue comments (Azure#16825)
1 parent 107aa9f commit 622b1e8

File tree

1 file changed

+10
-3
lines changed
  • sdk/communication/azure-communication-sms

1 file changed

+10
-3
lines changed

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
This package contains a Python SDK for Azure Communication Services for SMS.
66
Read more about Azure Communication Services [here](https://docs.microsoft.com/azure/communication-services/overview)
77

8+
[Source code](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/communication/azure-communication-sms) | [Package (Pypi)](https://pypi.org/project/azure-communication-sms/) | [API reference documentation](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/communication/azure-communication-sms) | [Product documentation](https://docs.microsoft.com/azure/communication-services/quickstarts/telephony-sms/send?pivots=programming-language-java)
9+
10+
11+
812
## Getting started
913

1014
### Prerequisites
@@ -39,6 +43,7 @@ To initialize the SMS Client, the connection string can be used to instantiate.
3943
Alternatively, you can also use Active Directory authentication using DefaultAzureCredential.
4044

4145
```Python
46+
from azure.communication.sms import SmsClient
4247
from azure.identity import DefaultAzureCredential
4348

4449
connection_str = os.getenv('AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING')
@@ -54,19 +59,21 @@ sms_client = SmsClient(endpoint, DefaultAzureCredential())
5459
Once the client is initialized, the `.send()` method can be invoked:
5560

5661
```Python
62+
from azure.communication.sms import SendSmsOptions, PhoneNumberIdentifier
63+
5764
smsresponse = sms_client.send(
5865
from_phone_number=PhoneNumberIdentifier("<leased-phone-number>"),
59-
to_phone_numbers=[PhoneNumberIdentifier("<to-phone-number>")],
66+
to_phone_number=[PhoneNumberIdentifier("<to-phone-number>")],
6067
message="Hello World via SMS",
6168
send_sms_options=SendSmsOptions(enable_delivery_report=True)) # optional property
6269
```
6370

64-
- `leased-phone-number`: an SMS enabled phone number associated with your communication service
71+
- `from-phone-number`: an SMS enabled phone number associated with your communication service
6572
- `to-phone-number`: the phone number you wish to send a message to
6673
- `send_sms_options`: an optional parameter that you can use to configure Delivery Reporting. This is useful for scenarios where you want to emit events when SMS messages are delivered.
6774

6875
## Troubleshooting
69-
The Azure Communication Service Identity client will raise exceptions defined in [Azure Core][azure_core].
76+
The Azure Communication Service Identity client will raise exceptions defined in [Azure Core](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/README.md).
7077

7178
## Next steps
7279
### More sample code

0 commit comments

Comments
 (0)