The short answer
A mobile app API is a set of agreed requests and replies that lets the app on a phone fetch and send data to a server or an outside service. Common integrations cover sign-in, payments, maps, messaging, analytics and email. The main risks of third parties are outages, changed terms or fees, data responsibility and being hard to replace.
What a mobile app API is
A mobile app API is a defined way for the app to ask another system for something and get a reply. The app sends a request, such as show this customer's orders, and the other system answers with data or an error. API stands for application programming interface, but the useful idea is the agreement: what can be asked, in what form, and what the reply will look like.
A phone app usually does little on its own. It draws screens and collects input. The accounts, orders, content and business rules live on a server, and the API is the doorway to them. That is why one API can serve an iPhone app, an Android app and a website at once, and why a store can keep a single set of product and order data. The comparison of an ecommerce website vs a mobile app shows how that shared back end works for shops.
The same reasoning softens the choice between app types. A web app and a native app can call the same API, so choosing one first does not lock you into one back end. The guide to native app vs web app covers the other differences.
How one request works
Take a customer tapping Track my order. Four things happen in a fraction of a second.
- The app sends a request over a secure connection. It includes proof of who the user is, usually a token issued when they signed in.
- Your server checks the token and confirms the user may see that order.
- The server fetches the order and sends back the data, commonly in a structured text format such as JSON.
- The app turns the data into the screen the customer sees.
Each of those steps can fail. The connection can drop, the token can expire, the server can be slow or the data can be missing. A well-built app plans for each failure and tells the user what to do next. That planning is where much of an API's real cost lies, more than in the happy path.
Which integrations are common
An integration connects your app to a service you did not build. The table lists the usual jobs, with the decision each one needs from you.
| Job | What the service does | Decision to make |
|---|---|---|
| Sign-in | Lets users log in with an email address, a phone number or an account held elsewhere | Which methods to offer, and who holds the user accounts |
| Payments | Takes card or wallet payments and reports the result | Which payment methods your markets expect, and how refunds and failed payments are handled |
| Maps and location | Shows maps, finds places, works out routes | Is live location needed, and what is the user told about it |
| Messaging | Sends push notifications, emails or text messages | Which messages are essential, and what happens if one is not delivered |
| Analytics and crash reports | Records how the app is used and where it fails | What you track, and what users are told |
| Support and chat | Provides a help desk or live chat inside the app | Where conversations are stored, and who answers them |
| Files and media | Stores images, video and documents and delivers them quickly | Who owns the files, and what happens if the service is switched off |
| Business systems | Links to your booking tool, stock system, accounting or customer records | Which system holds the master copy of each piece of data |
Every row adds a company to your app's supply chain. List the integrations you expect in your brief, so that each quote includes them. The guide to writing an app brief for a developer has a place for exactly this list.
Call the service from the app, or go through your own server
There are two ways to connect to a third party. The app can talk to the service directly, or the app can talk to your server, which talks to the service. Direct calls are quicker to build. Calls through your server are usually safer and easier to change.
Going through your server has several advantages.
- Secret keys stay on the server. Anyone can download an app and inspect its files, so a secret placed inside the app can be found.
- Your rules and limits are applied in one place instead of being repeated in every app.
- You can change provider without releasing a new version of the app through the stores.
- You can combine data from several services before the app sees it.
Direct calls still make sense for some services, especially those designed to be used from a phone, which often supply a public key made for that purpose. Follow each provider's own instructions and check the current documentation. Ask your developer which pattern each integration uses, and why.
Risks of relying on third parties
Outages
If the payment service is down, customers cannot pay, and you cannot fix it. You can decide what the app says, whether it retries and whether orders can be taken another way.
Changes you did not ask for
Providers change their interfaces, retire old versions and alter their terms and fees. An integration that works today can stop working when an old version is switched off. Providers usually announce changes in advance, so someone in your business or your developer's team must read those notices and own the integration after launch.
Cost that grows with use
Many services charge by use, so the bill follows your user numbers. Read the provider's current pricing page, model it against the usage you expect, and keep in mind that it can change.
Data and privacy
When a third party collects data inside your app, the user still thinks they are dealing with you. Ask your developer how each store expects collected data, including data gathered by outside code, to be declared, and check the current documentation of both stores. For privacy rules in your markets, ask a lawyer.
Security
Each integration is another place where a weakness can enter. Keep the number small, choose services that are actively maintained, keep their code libraries up to date, and give each one only the data it needs.
Weight and speed
Outside code libraries add to the size of the app and can slow its start-up. Ask what each one adds.
Lock-in and endings
Your data may sit in the provider's system. Ask how you can export it, and what happens if you leave or if the provider closes or is bought. A sign of care is recent updates, clear documentation and a public status page.
Questions to ask before choosing an integration
- What does it do for us that we cannot do simply ourselves?
- Will the account be in our business's name, with our email address as the owner?
- What happens to our data if we leave?
- How are outages reported, and how are changes announced?
- How long are old versions supported after a new one appears?
- What does it cost as use grows, and where is that written down?
- What data does it collect from our users?
- Does it work in the countries, languages and currencies of our customers?
- Can people using screen readers or larger text use it?
The last question is easy to forget. Payment forms, chat windows and sign-in screens supplied by others are still part of your app, and users will not distinguish them. Test them against the points in the guide to mobile app accessibility basics.
Plan for the day an integration fails
Design the failure screens when you design the success ones. For each integration, decide what the user sees if the service is slow or unavailable, whether the action can wait and retry later or must stop, and who is alerted. A message that says what happened and what to do next keeps trust. A spinner that never ends loses it.
For the wider principles behind clear screens, see app UX basics for first-time founders.
Own the accounts and keep a list
Create every service account in your business's name, using an address the business controls, and store the keys where more than one trusted person can reach them. Do not leave them in a developer's personal notes. Keep a one-page register of each integration: what it does, who owns the account, where the bill goes and who to contact when it breaks.
If you want a team to design the API and connect the services, the mobile app development page describes what Liftup Technologies builds.
