.NET

前提条件の設定

このチュートリアルを始める前に、いくつかの前提条件をクリアしておく必要があります。すでに完了している場合は、このステップをスキップしてください。

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 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.

以下の言語で利用可能:
.NET
手順
1
Introduction to this tutorial
2
Prerequisites
3
Create the SMS Project File
4
Add Vonage Dotnet SDK
5
Add an SMS Controller
6
Run the .NET App
7
Conclusion