Create vCard QR Codes using Azure Functions

Today I’ll show you how to develop a Web API to Create vCard QR Codes using Azure Functions.

But wait what are Azure Functions?

As defined by Microsoft:

Azure Functions is a serverless event driven experience that extends the existing Azure App Service platform. These nano-services can scale based on demand and you pay only for the resources you consume.

And what does serverless means? I really like the definition given by Scot Hanselman in his post What is Serverless Computing? Exploring Azure Functions:

Serverless Computing is like this – Your code, a slider bar, and your credit card. You just have your function out there and it will scale as long as you can pay for it. It’s as close to “cloudy” as The Cloud can get.

Now let’s start:

1. Create a Function App
2. Create the function
3. Add the code
4. Fixing the missing references
6. Create an HTML endpoint for the function
7. Test the Web API

You can grab the code for the function here: https://gist.github.com/cmendible/4b6627bcf288b94af9be4d25f6e66d5f

Hope it helps!

3 thoughts on “Create vCard QR Codes using Azure Functions

  1. Hi,

    thanks for you nice example for azure functions,
    When I post http request using postman,I got “An error has occurred” with response.
    And I got following log in Azure Function.
    Exception while executing function: Functions.VCard. System.Net.Http.Formatting: No MediaTypeFormatter is available to read an object of type ‘SimpleVCardRequest’ from content with media type ‘text/plain’.

    How should I fix it ? thanks

    1. In postman’s Body tab select the raw type and JSON (application/json) in the dropdown (I show this in the picture just above the QR code in the post). It should work now…

      Hope it helps!

Leave a Reply

Your email address will not be published. Required fields are marked *