Creating API using Netlify functions

Netlify offers free static website hosting with features like continuous deployment services, user-authentication, and form-handling. But static sites have limitations to perform server-side operations. These limitations have been addressed by Netlify by providing features to create Serverless Functions. In this blog, we'll create a simple application that displays a positive quote when we click the button. The quote displayed is returned from the API we'll create using netlify lambda function and deploy it. So let's get started. What is Serverless Computing? Serverless computing (or commonly referred to as serverless) is an execution model where cloud providers execute the piece of

Sign API request using Postman pre-request scripts

When we are about to test a dynamic API request via Postman and realize that we need to pass a freshly generated signature in the headers, what do we generally do? For each request, we generate the signature using server-side code and copy-paste it in the headers. Sounds like a tedious job, doesn’t it? We faced a similar situation in our application where we had to pass a signature in the headers while testing an API. The signature was generated by encoding all the request parameters using the user's secret key. If any of the request parameters changed, we

Communicating with Sendgrid V3 API

Sendgrid provides email service which we can use for sending emails from our app and we can even track every details of any email sent through our Sendgrid account like whether it is delivered, opened, dropped and details of unsubscribed email addresses etc. There are also API endpoints provided by Sendgrid to access user subscribe/unsubscribe related data and email event data with respect to emails sent through your sendgrid account for which documentation link is provided at bottom. To understand this lets go through simple example to fetch sendgrid subscription groups data from your sendgrid account - Generate API

Using Stripe API for Payment Transactions and generating Sales Report

Recently we had requirement to generate weekly sales report in one of the E-commerce apAs we were using Stripe services for payment handling, I studied some of Stripe API methods and how it actually works. So in this article I will briefly explain how we can handle payment through Stripe and how we can get sales data from Stripe. Firstly these are few basic steps to start using Stripe API: Add 'stripe' gem to your gemfile. bundle it You will get secret and public key pairs for live and test mode each from your Stripe account. You need to set

Facebook API versioning

Facebook's Platform supports both versioning and migrations so that app builders can roll out changes over time. Goal of versioning: The goal for having versioning is for developers building apps to be able to understand in advance when an API or SDK might change. They help with web development, but are critical with mobile development because a person using your app on their phone may take a long time to upgrade (or may never upgrade). Faecbook recommends to use graph-api version 2: Older versions of Facebook's API will expire April 30, 2015 and there are some significant changes between the