![]() Message: "Site #1 - Alert - Temperature is High!"Ĭonsole.error( "Something went wrong when trying to send this message: ", sendResult) A successful flag is used to validate if each individual message was sent successfully. You may also pass an options object to specify whether the delivery report should be enabled and set custom tags for the report. You need to pass in a SmsSendRequest object. ![]() To send an SMS message, call the send function from the SmsClient. import from endpoint = " const credential = new DefaultAzureCredential() Ĭonst client = new SmsClient(endpoint, credential) npm install can directly use the connection string or using Azure Active Directory managed identity to authenticate the communication services when using it from the Azure services. It provides an asynchronous method to send SMS messages. SmsClient is the primary interface for developers using this client library. In a node.js project, install the package. ![]() Using Azure Node.js SDK to send SMS number You can select a phone number type - Local or Toll-Free number and the capabilities include inbound / outbound with a call or SMS> Instructions on how to get a phone number using the Azure Portal can be found here. Phone numbers can be acquired and assigned to a Communication Services resource from the Azure Portal. The free trial or MSDN accounts cannot get the phone numbers for SMS/Telephony services.Ī phone number is assigned to your Communication Services resource. To get a phone number, you've to use Paid Account.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |