Configure your prerequisites

There are a few prerequisites that you need to complete before you can work through this tutorial. If you've already completed any of them, feel free to skip that step.

You can create a Vonage account via the Dashboard.

Within the Dashboard you can create Applications and purchase Vonage numbers. You can also perform these tasks using the Vonage CLI.

Download and install the latest version of the .NET Core SDK.

You must make your webhook accessible to Vonage’s APIs over the public Internet. A straightforward way to achieve this during development without standing up your own server is to use Ngrok. To learn more, read our documentation on Ngrok.

Download and install ngrok, then execute the following command to expose your application on port 3000 to the public Internet:

./ngrok http 3000

If you are a paid subscriber you could type:

./ngrok http 3000 -subdomain=your_domain

NOTE: In this example Ngrok will divert the Vonage webhooks you specified when you created your Vonage application to localhost:3000. Although port 3000 is shown here, you can use any free port that is convenient.

Configure Account Webhooks

In order to receive SMS messages and DLRs you will need to set two account level settings. Your account level Delivery Receipt and Inbound Messages URL. You can find this in your dashboard account settings page.

Set these URLs to, replacing NGROK_HOST_NAME with your ngrok host name

  • Inbound Messages: http://NGROK_HOST_NAME/webhooks/inbound-sms
  • Delivery Receipts: http://NGROK_HOST_NAME/webhooks/dlr

How to Receive SMS Delivery Receipts with ASP.NET Core MVC

Delivery receipts allow you to get information about when an SMS is delivered to a user's handset. This tutorial shows how you can receive these delivery receipt notifications in your ASP .NET application.

Steps
1
Introduction to this tutorial
2
Prerequisites
3
Create the SMS Project File
4
Add Vonage Dotnet SDK
5
Create Send SMS Model
6
Create a Send SMS View
7
Set up Startup Route
8
Add an SMS Controller
9
Add Delivery Receipt Route to Controller
10
Configure the ASP.NET App
11
Run the .NET App
12
Conclusion