SmsClient Class
A client to interact with the AzureCommunicationService Sms gateway.
This client provides operations to send an SMS via a phone number.
- Inheritance
-
builtins.objectSmsClient
Constructor
SmsClient(endpoint: str, credential: TokenCredential, **kwargs: Any)
Parameters
- credential
- <xref:TokenCredential>
The TokenCredential we use to authenticate against the service.
Methods
| from_connection_string |
Create SmsClient from a Connection String. |
| send |
Sends SMSs to phone numbers. |
from_connection_string
Create SmsClient from a Connection String.
from_connection_string(conn_str: str, **kwargs: Any) -> SmsClient
Parameters
- conn_str
Returns
Instance of SmsClient.
Return type
send
Sends SMSs to phone numbers.
send(from_: str, to: Union[str, List[str]], message: str, **kwargs: Any) -> [SmsSendResult]
Parameters
The single recipient or the list of recipients of the SMS.
- enable_delivery_report
- bool
Enable this flag to receive a delivery report for this message on the Azure Resource EventGrid.
- tag
- str
Use this field to provide metadata that will then be sent back in the corresponding Delivery Report.
Returns
A list of SmsSendResult.
Return type
Feedback
Submit and view feedback for