I was recently tasked with a project where I needed to gather data from Stack Overflow so it could be easily evaluated without having to dig around the website. Stack Exchange has many REST APIs available, some of which that don’t even need tokens or authentication, so it came down to how I wanted to consume this data.Read More
When building an application of any kind, there may be a need to have it send emails. For example, let’s say you’re building a script and that script needs to send a report through email when it has completed. Or another example is a web application with a form for collecting user feedback. There are many more application scenarios beyond the two listed.
Now let’s say that you don’t have your own email server for sending emails.
Sending emails without a server is easy when you use a transactional email service like the Mailgun API. Through HTTP, emails can be sent from any application and for a very affordable price. We’re going to see how to send emails using Mailgun with Golang.Read More
Not too long I wrote about consuming remote API data using Golang. However, as you know, I’m also a heavy Node.js developer as well. So how do we issue HTTP requests from within a Node.js application and why might you want to. The simple answer is that you might want to consume someone else’s data within your web application and you can’t just do that like you would in a browser-based application using Ajax or similar.
We’re going to see how to make HTTP requests possible within Node.js.Read More
I am pleased to announce that the latest episode of The Polyglot Developer Podcast is now available to download from all the popular podcasting networks. In this episode titled, Authorizing Access with OAuth, I’m joined by Ryan Chenkie from Auth0 to talk about OAuth and how it can be used to authorize access to your data by third-party applications.Read More
I am a huge fan of the Go programming language and have written a decent amount of material on the subject. For example, a popular tutorial I wrote titled, Create a Simple RESTful API with Golang, focuses on developing an API. However, I recently received questions on the subject of consuming data from other APIs from within a Go application.
We’re going to see how to issue HTTP requests from within Go, in an effort to consume or send data to other RESTful APIs that might exist on the internet.Read More
Anyone that operates a website or web application with a contact page knows how bad the SPAM problem on the internet is. Spammers, phishers, and other malicious people create bots that will crawl search engines for contact forms and send emails to the hosts, register accounts, or something else. There was a point in time that I was receiving more than ten emails a day from spammers that wanted to redesign my website. This kind of activity is incredibly annoying on my inbox.
This is where CAPTCHA and reCAPTCHA form elements come into play. These elements typically require some interaction such as typing words from an image or solving a math problem. Adding this small amount of form complexity can go a long way towards stopping bots.
We’re going to see how to hook up a Google reCAPTCHA element into a client facing form and validate that element using a Node.js backend.Read More
When it comes to authenticating users for making use of your API, it is a good idea to add an extra step beyond standard username and password. This is called two-factor authentication (2FA) and it acts as a second layer of security for users making use of your application.
Not too long ago I had written about adding 2FA to a RESTful API created with Node.js and Express Framework, but what if we wanted to do it in Golang? The logic isn’t any different, just a new syntax for a new language.
We’re going to see how to add two-factor authentication to a Golang API that makes use of Json Web Tokens (JWT).Read More