How APIs Work

Mark Valles
Mobile app development 101: APIs

For the general public, the term “APIs” may not ring the slightest bell. But did you know that without this mobile app development component, the world as we know it today would not be the same?

For instance, without APIs, we won’t be able to use social media apps on our smart phones. The mere act of using an app on our phones to post something on Facebook, Twitter, Instagram, or LinkedIn accounts have APIs involved in the background. The same goes for online streaming services such as YouTube, Netflix, and Spotify. They won’t work on our mobile devices without APIs. Booking flights or hotels online won’t also be possible without APIs running behind the scenes.

In short, APIs are one of those technologies that have made its way into many aspects of our daily life, even without us realising it.

So what are APIs, and what do they do? This article gives you the lowdown into this mobile app development component that continues to reshape today’s digital landscape.

Beyond the acronym

API stands for application programming interface. APIs are a set of software components, tools, and rules (protocols).[1] Their role is to enable two (or more) independently designed systems, software, and, most commonly, applications to communicate.[2]

API (Application Programming Interface) text with drawing of device on notebook and glowing light bulbs

An API is like the post service of the digital world. Let’s imagine you are trying to send a letter to your friend. You write the letter, put down the address, and drop the letter into the post box. The postman then picks up your letter, brings it to your friend, who then reads and responds with a letter of their own.

An API does the same: It takes digital messages and transports them from one destination to another. If you are a developer trying to add weather forecasting into your app for example, your app would send a weather data request (a digital letter) to Google (your friend) via their API (the post service). Google would send a response (their letter) back to your app via their API also. Your app can then use data to show what the weather is for the day. 

Implementing APIs

How are APIs used in the real world? Let’s cite other scenarios that show this mobile app development component at work.

Social logins

Most developers these days streamline the sign-up process by connecting their apps to social login APIs.
Most developers these days streamline the sign-up process by connecting their apps to social login APIs.

Ever notice how easy it is these days to join multiple digital services even without signing up? Say you come across a newly launched music streaming application. You want to try it out, but hate going through the laborious sign-up process. However, you are suddenly presented with a “Continue with Facebook” or “Continue with Google” option. A click and viola! You’ve logged in without the manual hassle of filling out your profile information and are using the app within seconds.

So how did the music streaming app do that?

Developers are now able to streamline the sign-up process by connecting their apps to Facebook and Google’s login APIs. So in our example, the music app sends a request to Facebook or Google’s APIs. The API, then, returns the relevant authority to allow the user to access the music app.

In-app purchases

In-app purchase APIs enable ease of purchases for app add-ons, premium features, or other paid content
Developers connect their apps to in-app purchase APIs to enable ease of purchases for app add-ons, premium features, or other paid content.

In-app purchase APIs are another good case in point. Many apps offer premium services or add-ons on top of basic features for a fee.

The mobile game app Pokémon Go, for example, allows ease of levelling up to players if they spend money in the game. Users are able to do so because of the APIs implemented in the game app. 

Most developers connect their apps to the App Store or Google Play’s in-app purchase APIs to allow ease of purchases for app add-ons, premium features, or other paid content. In-app purchases also eliminate the burden of entering payment details for every transaction. By connecting their apps to Apple or Google’s in-app purchase APIs, the developers enable Google or Apple to maintain their app’s payment systems.

On the other hand, because the developers do not have to build an in-app purchase mechanism from scratch, they are able to focus more on polishing other functionalities of their apps.

Travel industry

Developers can also connect websites or apps to business partners’ APIs.
In the travel industry, aggregators connect their websites or apps to their partners’ APIs, and they’ll be able to use data from their partner websites accordingly.

Travel fare aggregators, such as Expedia and Booking.com, also use APIs. Let’s say you are planning to go on a vacation — naturally, you want to get the best available deals. Instead of visiting individual websites of multiple airlines and hotels to compare prices, you can go to a travel fare aggregator site.

The aggregator site, which partners with hundreds of airlines and accommodations, will do the search for you and show you which airlines and hotels have the cheapest ticket price and room rate. Travel fare aggregators just need to connect their websites or apps to their partners’ APIs, and they’ll be able to use data from their partner websites accordingly.

Dominate the App Store.

Get the latest industry news first.

Why have APIs become big?

For people in the development universe, such as the app developers at Appetiser App Development, a world without APIs is unimaginable.  Why is this the case?

Efficiency

These days, developers don’t need to build every application solution from the ground up, thanks to APIs.
These days, developers don’t need to build every application solution from the ground up, thanks to APIs.

APIs have become an enabler for building creative, purposeful, and innovative applications at a pace quicker than ever before.

Let’s say I am creating an app for a client. During the app development process, the client decides to add a chat mechanism to their app in addition to the unique selling points. However, the client still wants to bring their app idea to market as soon as possible. Is there a way for me to complete the app project within a reasonable period of time without compromising on quality?

The answer is a resounding yes. These days, developers can leverage existing application solutions via third-party services’ APIs. That way, developers don’t need to build every application solution from the ground up.

In this particular example, the practical route would be connecting my client’s app to the API of a cloud communication platform (the third-party service) that has the application solution needed (the chat mechanism). 

By implementing an existing solution via a third-party service’s API, I would be able to focus my energy on polishing the unique selling points that will make my client’s app standout in the market. The app can also be launched much more quickly than if I built the chat mechanism from scratch. 

Stability

Third-party service providers often release APIs in their stable versions.
Most third-party services take the necessary steps of testing their APIs thoroughly to ensure stability.

An additional benefit of implementing solutions via third-party services’ APIs is that they are highly probable to have already been “battle tested.” This means that the service provider had already taken the necessary steps of testing the APIs to make sure they are market-ready. Third-party service providers often make it a point to make their APIs are as future proof as possible by releasing them in their stable versions.

Of course, the solutions may still encounter bugs every now and then, but those instances would be minimal. Existing solutions would also have matured security wise. If the solution has been implemented by many apps already, security holes that surfaced especially during the infancy stage  — would have already been addressed accordingly. 

 Additionally, most APIs are easy to use, and even free.

But of course they have limitations!

Like any other technology, APIs are not perfect. Here are several points to consider when using this mobile app development component:

One size fits all

A developer who has specific needs for an app may have to discuss for customisation of solutions.
A developer who has specific needs for an app may have to discuss for customisation of solutions.

Third-party APIs are generally designed for mass consumption and are limited only to the purpose they serve. Hence, a developer who has custom needs for an app may have to reach out to the third-party provider personally and discuss for customisation of solutions. Of course, this is dependent on whether the third-party provider is willing to work on the developer’s request. If not, either the developer looks for an alternative solution, or forgoes the desired feature altogether.

Frequent changes

Developers should always be to update their apps.
Developers should always be ready to update their apps.

App developers would need to keep up with the third-party services’ iteration. To facilitate API integration, third-party services typically provide developers with software developer kits (SDKs). An SDK contains a set of software tools, documentation, and code examples developers can use when integrating the service. However, SDKs are updated regularly, so developers need to keep up with the changes resulting from any updates. Additionally, third-party services may implement policy changes that may have an impact on their SDKs or APIs. They may also introduce new versions of their bug fixes, bug patches, and security hosts. Developers should therefore be ready to modify their apps accordingly upon the release of any new versions or updates.

Trouble with incompatibilities

Developers also consider an API’s compatibility with the platforms and devices targeted by their apps.

The API or service being considered may not be compatible with the platforms and devices targeted. For instance, you want to connect your app to a niche service. However, you also discover that the niche service only supports an outdated iOS or Android version. Because it only makes sense that the app you’re developing is targeted toward the latest iOS or Android version, in the end, you may just have to forgo the niche service.

Lifespan unpredictability

The development industry is not an exception to businesses scaling down or even ceasing operations.
The development industry is not an exception to businesses scaling down or even ceasing operations.

In today’s volatile market, businesses scaling down or even ceasing operations have become almost commonplace. The development industry is not an exception to this situation. If say, a third-party service shuts down, apps heavily reliant on that service would have to find an alternative solution similar to the existing one. But if there is none, the risk posed here is that the app itself may also end up closing down. Therefore, businesses should look for third-party services that are most likely able to support their apps for a long period of time. Fortunately, many services nowadays would indicate in their agreement the length of commitment. Hence, the availing party is somehow assured that the third party wouldn’t suddenly shut down the service.

Some final words

The growing adoption of APIs has been among the dominant mobile app development trends of recent years — and it doesn’t show signs of slowing down any time soon. It’s not surprising, considering how this mobile app development component has made a huge impact on the way various applications are built.

On the other hand, given the continuing increase in the use of mobile devices (smart phones, tablets, computers, and more) and the internet, businesses would not want to miss out on the many opportunities offered by a digital economy. But to stay afloat in the digital age, businesses need to transform and modernise their technology. With their ability to connect systems to digital platforms, APIs can also help pave the way for businesses — big or small — to realise a digital transformation.

References:

[1] Columbus, L. (2017). 2017 is Quickly Becoming the Year of the API Economy. Retrieved from https://www.forbes.com/sites/louiscolumbus/2017/01/29/2017-is-quickly-becoming-the-year-of-the-api-economy/#40d37c276a41.

[2] Asthana, A. (2019). We’re Living In An API-First World — Let’s Start Developing Like It. Retrieved from https://www.forbes.com/sites/forbestechcouncil/2019/01/30/were-living-in-an-api-first-world-lets-start-developing-like-it/#2a369d33651b.

Dominate the App Store.

Get the latest industry news first.

Roamni Case Study
How Jason & Greg Built an App Worth Over $5 Million
  • How to Get $100,000s in Funding for Your App
  • What Makes a Profitable and Successful App
  • 7 Critical Entrepreneurial Lessons From Jason and Greg
  • How to Create Apps that Get People Hooked
Mark Valles

Mark Valles is the Lead iOS Developer for Appetiser. Mark previously worked on an iOS project called Piclyf, mostly with the development of Lifebit iOS. Mark also developed and maintained apps for F45 Training and for smart lock system companies (ImGATE and VIZPin). When not working, Mark enjoys sketching and spending time with his kids.
[if lte IE 8]
[if lte IE 8]
[name="utm_session_id"]
[name="utm_session_id"]