azure.communication.sms.aio package¶
-
class
azure.communication.sms.aio.
SmsClient
(endpoint: str, credential: AsyncTokenCredential, **kwargs: Any)[source]¶ A client to interact with the AzureCommunicationService Sms gateway asynchronously.
This client provides operations to send an SMS via a phone number.
- Parameters
endpoint (str) –
The endpoint url for Azure Communication Service resource.
- param AsyncTokenCredential credential
The AsyncTokenCredential we use to authenticate against the service.
-
async
close
() → None[source]¶ Close the :class: ~azure.communication.administration.aio.SMSClient session.
-
classmethod
from_connection_string
(conn_str: str, **kwargs: Any) → SmsClient[source]¶ Create SmsClient from a Connection String.
- Parameters
conn_str (str) – A connection string to an Azure Communication Service resource.
- Returns
Instance of SmsClient.
- Return type
SmsClient
Example: