

Var client = new PhoneNumbersClient(connectionString) Get a connection string to our Azure Communication Services resource. Phone Number clients can be authenticated using connection string acquired from an Azure Communication Services resources in the.
#Phone numbers update#
Update Main function signature to be async. dotnet add package -version 1.0.0Īdd a using directive to the top of Program.cs to include the namespaces. NET package by using the dotnet add package command.
#Phone numbers install#
While still in the application directory, install the Azure Communication PhoneNumbers client library for. dotnet new console -o PhoneNumbersQuickstartĬhange your directory to the newly created app folder and use the dotnet build command to compile your application. This command creates a simple "Hello World" C# project with a single source file: Program.cs. In a console window (such as cmd, PowerShell, or Bash), use the dotnet new command to create a new console app with the name PhoneNumbersQuickstart. In a terminal or command window, run the dotnet command to check that the.Create a Communication Services resource. An active Communication Services resource and connection string.NET Core client library for your operating system.

#Phone numbers code#
On the Numbers page, you will customize the phone number(s) which you'd like to provision.įind the finalized code for this quickstart on GitHub Prerequisites In our example, we've selected a Toll-free number type with Make calls and Send and receive SMS features.įrom here, click the Next: Numbers button at the bottom of the page to customize the phone number(s) you would like to provision. When you've selected a number type, you can then choose the feature. You can select from two phone number types: Local, and Toll-free. The selection of the number capabilities.After selecting the Country/region, you will then need to select the Use case which best suites your needs.Ĭonfiguring your phone number is broken down into two steps: You will first need to choose the Country/region where you would like to provision the phone number.
#Phone numbers series#
The wizard on the Phone numbers blade will walk you through a series of questions that helps you choose the phone number that best fits your scenario. Press the Get button to launch the wizard. Navigate to the Phone Numbers blade in the resource menu. To begin provisioning numbers, go to your Communication Services resource on the Azure portal.

To configure an environment variable, open a console window and select your operating system from the below tabs. You can configure the AZURE_COMMUNICATION_CONNECTION_STRING environment variable to use Azure CLI phone numbers operations without having to use -connection_string to pass in the connection string. (Optional) Use Azure CLI phone numbers operations without passing in a connection string
