T
We're Happier Together! NYC Devshop has joined the HappyFunCorp family! Learn more!

Devshop

A Lesson In APIs

A Lesson In APIs

Development

A Lesson In APIs

Posted by: Mike Trumpf

Thursday, Jun 2nd, 2016

Disclaimer - This article is meant to provide a high level perspective of what an API is, and what it can do for your app. If you are a developer with API experience, this blog post probably isn't for you. If you are new to programming, an entrepreneur developing app ideas for the first time, or a non-tech person dealing with developers, this will serve as a handy cheat sheet reviewing the basics of APIs.

What Are APIs?
API stands for Application Programming Interface. An API is a set of requests and responses that you can ask and receive from another program. Applications create APIs that allow others to access their information or use their services. When you see the option to "Login with Facebook" on an app, this would be an example of an app using Facebook's API. When you receive a message alerting you that your Uber is on it's way to you, the messaging API Twilio is at work. Though you may not have realized it, you deal with APIs on a daily basis.

Why Use Them?
APIs can be a great way to "quickly" add new features to your app and gather information about your users. Having this information can also lead to a more personalized experience for them as well. When a user signs up for your app using their Facebook login, you can instantly gather a wide range of information on them, such as their name, age, location, gender, hobbies, friend list, etc. You can then use that information to perform a variety of actions in your app, such as filling in their user profile, tailoring custom content to them, connecting them with their friends already on the app, and much more. However, not all APIs fall under content gathering. Others, such as the aforementioned Twilio messaging API, can add tools to your application's workbelt. Actions like sending a text to a user that their cab is on its way, or texting a password reset code, would be a lot harder if it wasn't for the Twilio API. These service APIs open up a realm of new ideas and possibilities. Many times the "Ah ha!" moment for a new app idea comes from the release of a new API!

Are APIs Free?
There are many free-to-use APIs. In return they ask that somewhere within your app, you state that you are using them. They want that advertising! Other APIs are not free, but come with a free trial period. The purpose of this free trial period is for you to make sure that this API fits into your app the way you hoped it would. When the trial period concludes, you are generally presented with a subscription based plan.

All APIs are not created equally...
You may have noticed that when describing why to use an API, I have the word "quickly" in quotes. This is because not all APIs and their documentation are built equally. There isn't a standardized template for how to build an API, so it is completely up to each service how they allow users to make requests and receive information. It also may not be a priority for them to have extensive documentation on how to use their API. Integrating an API that has great documentation as well as a support staff at your disposal can be an amazing experience, as was mine with the Eligible API. On the other end of the spectrum, an API with terrible documentation can lead to hours searching for answers on stack overflow, and other features of the app having to be pushed back.

Places to find APIs
Interested in what kind of APIs are out there? There are services that can help you discover what is out there such as Programmable Web and Mashape. Sometimes the best thing to do is just a good old-fashioned Google Search. Who knows, there may be an API out there you've never heard of that makes one of your latent app ideas possible now!

Takeaways
APIs are a great way to add features to your application and make a more personalized experience for your users. Hopefully, with this knowledge you can see the power of APIs, as well as some of the challenges they can bring developers. It can be tempting to want a bunch of APIs integrated with an application. Who doesn't want more information about their users and more tools in their app? Just know that trying to integrate an API with weak documentation can have you spending hours on something that might be nice to have, when those hours can instead be used on perfecting what you already do have.

Mike  Trumpf

Meet The Author

Mike Trumpf / Developer

Mike was born and raised in NJ and still can't figure out how people can hate on it. That being said, he has a growing affection for the busyness of NYC. Despite growing up a picky eater he ventures around the city looking to try different cuisines, but seems to have found his happy place with a Halal Guys combo platter in front of him. Extra White AND Red Sauce. Mike is somewhere between a stereotypical jock and nerd. He is a black belt in Tae Kwon Do, Fantasy Football Champ, video game savant, anime binge watcher, Harry Potter reader, gym frequenter, (y)ogger, meditater, and South Park fanatic. Mike has aspirations to create the next big thing that will change the world for the better.