Skip to content

AnnieGitUrGun/airtng-csharp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AirTNG App: Part 1 - Workflow Automation with Twilio - ASP.NET MVC

Build status

Learn how to automate your workflow using Twilio's REST API and Twilio SMS. This example app is a vacation rental site, where the host can confirm a reservation via SMS.

Local Development

  1. You will need to configure Twilio to send requests to your application when SMS are received.

    You will need to provision at least one Twilio number with sms capabilities so the application's users can make property reservations. You can buy a number right here. Once you have a number you need to configure your number to work with your application. Open the number management page and open a number's configuration by clicking on it.

    Remember that the number where you change the SMS webhook must be the same one you set on the TwilioPhoneNumber setting.

    Configure Voice

    To start using ngrok in our project you'll have execute to the following line in the command prompt:

    ngrok http 4567 -host-header="localhost:4567"
    

    Bear in mind that our endpoint is:

    http://<your-ngrok-subdomain>.ngrok.io/Reservations/Handle
    
  2. Clone this repository and cd into its directory:

    git clone [email protected]:TwilioDevEd/airtng-csharp.git
    
    cd airtng-csharp
    
  3. Create a new file AirTNG.Web/Local.config and update the content with:

    <appSettings>
      <add key="TwilioAccountSid" value="Your Twilio Account SID" />
      <add key="TwilioAuthToken" value="Your Twilio Auth Token" />
      <add key="TwilioPhoneNumber" value="Your Twilio Phone Number" />
    </appSettings>
    
  4. Build the solution.

  5. Run Update-Database at Package Manager Console to execute the migrations.

  6. Run the application.

  7. Check it out at http://localhost:4567

That's it!

To let our Twilio Phone number use the callback endpoint we exposed, our development server will need to be publicly accessible. We recommend using ngrok to solve this problem.

Meta

  • No warranty expressed or implied. Software is as is. Diggity.
  • MIT License
  • Lovingly crafted by Twilio Developer Education.

About

AirTNG - Rental-by-owner properties fit for a Captain, implemented in C# with .NET MVC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 83.3%
  • JavaScript 13.7%
  • CSS 2.9%
  • Classic ASP 0.1%