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:
If you are a paid subscriber you could type:
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 an SMS Message with ASP.NET Core MVC
A tutorial to show how your ASP .NET MVC application can use the Vonage .NET SDK to receive SMS messages from your users and display them in your output window.