Skip to content

nexmo-community/receive-sms-blazor

Repository files navigation

Project Name

Nexmo is now known as Vonage

This repository demonstrates how to receive an SMS message with Blazor. It contains an asp.net server that, when run, will listen on an InboundSms route and push inbound sms's to any browser's connected to the server.

Welcome to Vonage

If you're new to Vonage, you can sign up for a Vonage API account and get some free credit to get you started.

Prerequisites

Testing with Ngrok

If you are using ngrok with IIS express I'd encourage you to check out our explainer on the subject as there are special considerations. For the purposes of this demo, since we are using the dotnet CLI we don't need to worry about this. Run the following command in a separate console.

ngrok http 5000

This will build a tunnel to that port. You can now run your application by using the dotnet run command. Check back at your ngrok console it will tell you the publicly accessible URL of your app.

ngrok

In this case it's pointing to http://09c1cd61e26e.ngrok.io/, by navigating to that URL you can actually see the application's frontend.

frontend

Configure your Webhooks

The route to our inbound sms webhook would be /api/sms/inboundsms. This means that the full route is going to be http://09c1cd61e26e.ngrok.io/api/sms/inboundsms. All that's need to do now is navigate to settings page and set the inbound messages url to our route, and set the http method to POST-JSON. Click the Save Changes button at the bottom.

Settings page

Test

In order to test, all that's needed is to send a text message to a Vonage API Number associated with your account. That can be found on the dashboard under numbers->Your Number.

When all is said and done it will look something like this.

Inbound Message

Getting Help

We love to hear from you so if you have questions, comments or find a bug in the project, let us know! You can either:

Further Reading

About

Demonstration about how to receive an SMS with blazor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published