Send an SMS Message Quickstart
For full instructions on how to build this code sample from scratch, look at Quickstart: Send an SMS Message
- An Azure account with an active subscription. Create an account for free.
- Install Visual Studio
- The latest version .NET Core client library for your operating system.
- An active Communication Services resource and connection string. Create a Communication Services resource.
- An SMS enabled telephone number. Get a phone number.
- ./SendSMS/Program.cs: Core application code with send SMS implementation.
- ./SendSMS/SendSMS.csproj: Project configuration file.
- ./Samples.sln: Visual Studio solution.
Before running sample code
- Open an instance of PowerShell, Windows Terminal, Command Prompt or equivalent and navigate to the directory that you'd like to clone the sample to.
git clone https://github.com/Azure-Samples/Communication-Services-dotnet-quickstarts.git
- With the
Connection Stringprocured in pre-requisites, add it to the SendSMS/program.cs file. Assign your connection string in line 3:
const string connectionString = "YOUR_CONNECTION_STRING";
- With the SMS enabled telephone number procured in pre-requisites, add it to the SendSMS/program.cs file. Assign your telephone number in line 13:
from: new PhoneNumber("+1YOUR-PHONE-NUMBER"),
- Run the