Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now
Build the future of communications.
Start building for free
  • By Layla Porter
    Broadcasting with SignalR and .NET Core Boradcasting with SignalR and .NET Core

    SignalR is a library for .NET developers for adding real-time web functionality to applications. It is often used for real-time chat applications but is also great for live dashboards and games!

    SignalR takes advantage of several transports, automatically selecting the best available transport given the client and server's capabilities. SignalR uses WebSockets under the hood when available, and gracefully falls back to other techniques and technologies when it isn't.

    I've recently been working with Twitch chatbots and wanted to use SignalR to update browser scenes based on commands sent in via my viewers.

    This meant that I would need to call a SignalR broadcast from a different project.

    This blog will share how to do that.

    If you would like to see my completed project, it's available on my GitHub here.

    What you'll need:

    • A basic knowledge of ASP.NET Core
    • .NET Core 3.1 installed
    • An IDE such as Visual …
    Read More
  • By Layla Porter
    Building a real-world Twilio application in ASP.NET Core Building a real-world Twilio application in ASP.NET Core and C#

    As developers, we are well-used to taking a mix of code examples and trying to figure out how to actually implement these disjointed bits into a real world application.

    In an effort to make this process easier, I created a detailed, real-world five-part video workshop!

    I've used .NET Core to build the application in the workshop. .NET Core is an awesome framework and completely cross-platform, so whether you are on macOS, Windows or Linux, you can follow along with the code.

    The workshop utilises Twilio products such as Twilio Studio, Twilio API for WhatsApp and Twilio SendGrid.

    The workshop focusses (that's the British spelling for my American grammar checking friends!) on building out an ASP.NET Core 3.1 MVC application for The Cloud City Cake Co.. The Cloud City Cake Co. loves using tech to make the lives of its customers easier through technology.

    What's covered

    In video …

    Read More
  • By Layla Porter
    Using SQL Server on macOS with Docker Using SQL Server on macOS with Docker

    Since the release of .NET Core 1.0 in 2014, .NET developers have no longer been confined to development on Windows. Yet I am still surprised by how many people don't realise that .NET Core is cross-platform!

    I develop all my .NET code, from web apps to Azure Functions, on macOS and with SQL server being a large part of developing with .NET, I wanted to share how I use it on macOS.

    We will use a Docker container to host SQL server, which means this technique could also be used on Windows and Linux and not just macOS.

    If you would like to see a full integration of Twilio APIs in a .NET Core application then checkout this free 5-part video series I created. It's separate from this blog post tutorial but will give you a full run down of many APIs at once.

    Getting Started with Docker

    To get …

    Read More
  • By Layla Porter
    Dependency Injection in Azure Functions with C# Title image: Dependency Injection in Azure Functions with C#

    One of my favourite features of Azure Functions v2 and above is the ability to include a Startup class. Why is this cool you may ask? Well, it means that you can use .NET Core's built-in Dependency Injection (DI). This then means that project architecture can look remarkably like ASP.NET Core web apps. DI also makes testing easier as dependencies can be mocked. In this post, I'll show you how you can quickly add DI to an Azure Function.

    Note: Azure Functions v3.0 became GA in January 2020. This means that you can now use .NET 3.1 and Node 12 in your Azure Functions. They still don't support the newSystem.Text.Json but that should come in time.

    If you would like to see a full integration of Twilio APIs in a .NET Core application then checkout this free 5-part video series I created. It's separate from this blog post tutorial …

    Read More
  • By Layla Porter
    Get off the naughty list with Twilio Autopilot, Azure Functions and Table Storage Get off the naughty list header

    This blog post is part of The Third Annual C# Advent by Matthew Groves which is a C# advent calendar.

    Do you worry you're stuck on the naughty list? Have you forgotten all the good deeds and awesome things you've done over the past year to deserve more than a sack of coal?

    Tracking your little wins as they happen is a fantastic way to remember your successes whether you're sharing the list with your boss or Santa Claus or just yourself!

    We will use Twilio Autopilot to capture your accomplishments, thus enabling you to keep a log via SMS, voice, WhatsApp, Slack or even your Amazon Alexa or Google Home device!

    We're going to save the output of Autopilot to Azure Table Storage via an Azure Function.

    This post assumes some basic knowledge of C# and RESTful APIs.

    To get started, we will need:

    Read More
  • By Layla Porter
    Rainy with a chance of Azure Cloud Rainy with a chance of cloud

    We all have good days and bad days. On a good day, we may be filled with positive thoughts and on a bad day, we may forget that anything was ever positive!

    gif of cartoon animal crying in the rain

    In this post, we will use Twilio to text your positive thoughts and affirmations to an Azure Function and save them in Azure Table Storage. We will then create a timer-based function that will send a random happy thought from the table storage via SMS to your friends.

    This post assumes some basic knowledge of C# and RESTful APIs.

    To get started, we will need:

    Read More
  • By Layla Porter
    Test Driven AutoMapper with .NET Core VNcMVOXYfSc2DCoiaq5heVIF6fTmdIPVXG81WxYpM5QG06S-df8fuYYbNjgavC69zPz6U9afsp2RIjnxL0VA0T3M5TwyCqdIpmgXGStZp7NvzSP0utazOyORagpt1LutXk1m21bH

    If you use data in a project then you have most likely had to map one model to another.  Whether you've done that in the constructor, a dedicated method, or used a mapper of some sort, it can be repetitive and tedious.

    AutoMapper, a library for .NET written by Jimmy Bogard, has been around for a while.  It had a revamp to work with .NET Core and Dependency Injection but can still feel a little bit like magic.

    I use AutoMapper for an internal Twilio tool.  I struggled to create valid maps that work without requiring me to map everything manually.

    I found the best way to configure AutoMapper is by writing tests and lettingAutoMapper tell me exactly what I need to configure. Let me show you how that works.

    I have created a solution in this repository that has the AutoMapper NuGet package already installed and all …

    Read More
  • By Layla Porter
    Daily Dog with C#, WhatsApp and Azure functions 822m66DdV5S5TrfkutIagXi-tELxwMf92-KOdnf64XbhS8GoCdTYklLhMJiNKi4QTNCZ_nb50f7I9582qI1iZcOiiJ1yuOBIejZ5T5nNjn0QyoKQWY0v843XjJvxYPum-kQsq0Q7

    I love Bing Image of the day, it always makes me smile! I also love dogs, so I thought why not combine the two and create an app that sends a daily dog picture via WhatsApp.

    This post will take you through all the steps to create an azure scheduled function in C#, make a call to the Dog API to retrieve a photo and then send the returned image to a number via the Twilio API for WhatsApp.

    This post assumes some base knowledge of C# and RESTful APIs.

    To get started, we will need:

    Create an Azure Function

    From the Azure portal, click the Create a resource button, …

    Read More
  • By Layla Porter
    Receive an SMS and email it using Twilio SendGrid, C# and .NET Core vqwvGirMVXQf8bGStK4xKGF4vtzssY0VthK_xXQyITCdwJoMGJlN_2BxVqxkzasx2t5Vt9HV2T9WIdEDNZHh0a3EISjvwX5eDCwktAsPSJEPWJkQDmAEKDJ47FInZi_XlcaslMHr

    An apt business use for both Twilio SMS and Twilio Sendgrid would be for customer enquiries on a website.  Using C# and .NET Core 2.2 we will build an app that receives an SMS, takes the from number and the message body and send out an email using Twilio SendGrid.

    To get started with this project you will need the following:

    If you would like to see a full integration of Twilio APIs in a .NET Core application then checkout this free 5-part video series I created. It's separate from this blog post tutorial but will give you a full run …

    Read More
  • By Layla Porter
    Send a WhatsApp media message with C# in 30 Seconds ioc5s81IAy6e0Cqe_VcjmBc5qfB-J1WSRBbtj0sS-A7CaslmfXu6fylG_YRsfJa0OelC0KBBZ2kFSmV32t-Wdl11UXbiGaYBnfYTwmBvIC2zCRWcC6ZBXj95mYFeWgVB5G_mSRzP

    When the Twilio API for WhatsApp was launched in Summer 2018 it could only handle text-based messages.  Now, the API can send and receive media 🎉. Sending a media message with WhatsApp is just as quick as sending a text message, here's how in just 30 seconds!

    To make this even quicker to get started, below is all the code and a link to the completed project on GitHub.

    If you would like to see a full integration of Twilio APIs in a .NET Core application then checkout this free 5-part video series I created. It's separate from this blog post tutorial but will give you a full run down of many APIs at once.

     

    To code along with this post, make sure the following are set up:

    Read More
  • Newer
    Older
    Sign up and start building
    Not ready yet? Talk to an expert.