derekforeman / airtng-csharp

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

Home Page:https://www.twilio.com/docs/tutorials/walkthrough/workflow-automation/csharp/mvc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Twilio

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.

Read the full tutorial here!

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

    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"
    

    Keep in mind that our endpoint is:

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

    git clone git@github.com:TwilioDevEd/airtng-csharp.git
    
    cd airtng-csharp
    
  3. Create a new file AirTNG.Web/Local.config and update the content.

    <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

https://www.twilio.com/docs/tutorials/walkthrough/workflow-automation/csharp/mvc


Languages

Language:C# 83.4%Language:JavaScript 13.7%Language:CSS 2.9%Language:ASP 0.1%