Skip to content

Learn how to use the Vonage SMS API with a real-world application using ASP.NET MVC Application and .NET 6.0.

License

Notifications You must be signed in to change notification settings

Vonage-Community/blog-sms-csharp-realestate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Vonage ASP.NET MVC Application and .NET 6.0 Sample

This repository shows you how to use the Vonage SMS API with a real-world application using ASP.NET MVC Application and .NET 6.0. For more information, please see the blog post at HERE.

Vonage Config Listing 1: The completed web application that we are building

Requirements

This application requires that you have the following installed locally:

Additionally, to test the application, you must have a Vonage account. You can create a Vonage account for free or manage your Vonage account details at the Vonage Dashboard.

Installation and Usage

You can run this application by first cloning this repository locally and opening in Visual Studio or using the built-in source management tooling inside of Visual Studio.

Once you have downloaded a local copy, change into the directory of the application and you can now set up the API credentials for your Vonage account.

API Credentials

Inside the Domain folder, you'll see a file named Configuration.cs. Add your Vonage API key to the string values for APIKey and APISecret.

As always, make sure not to commit your sensitive API credential data to any public version control.

Setting the Phone Numbers

You'll need to set the To and From phone numbers that the application uses. You can find this by going to the Controllers folder and editing line 33 and 34 in the HomeController.cs file.

Running the Application

Once you have your API credentials incorporated and your desired phone numbers, you can go ahead and press F5 within Visual Studio to load the app.

Once the web application loads, you can test that everything is setup correctly by entering a phone number and a message. If everything works successfully, then you'll see "Message sent successfully! An agent will contact you shortly." otherwise, you'll see Message Failure. Please try your request again.

Contributing

We ❤️ contributions from everyone! If you see something that needs fixed, then please follow the GitHub Flow and we'll try to incorporate it.

License

This project is under the Apache 2.0 License

About

Learn how to use the Vonage SMS API with a real-world application using ASP.NET MVC Application and .NET 6.0.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages