Google Cloud APIs & Services: What It Is, When to Use It, How to Create APIs and Credentials (Real Example)

The first time I tried to show a map inside an Android app, the screen stayed grey. No error on the phone, nothing useful in Logcat, just an empty grey box where Pune was supposed to be. I spent almost a whole evening checking my code. The code was fine. The real problem was that I had never turned on the Maps SDK in Google Cloud APIs & Services, and my API key was created in a different project. Two clicks fixed what I had been debugging for four hours.

That evening taught me that APIs & Services is the “main switchboard” of every Google Cloud project. In this tutorial I will explain it in simple words: what APIs & Services is, when you need it, how to enable an API and create credentials step by step, where it is used in real projects, and a complete real-time example of a property listing app that you can follow.

Google Cloud APIs & Services - enabled APIs and credentials like API key and OAuth client
Google Cloud APIs & Services: enable APIs and manage credentials in one place

What Is Google Cloud APIs & Services?

Google Cloud APIs & Services is the section of the Google Cloud Console where you turn Google APIs on or off for your project, create the credentials (API keys, OAuth client IDs, service accounts) your apps use to call those APIs, and watch how much each API is being used.

First, a quick refresher. An API (Application Programming Interface) is a door that lets your code talk to someone else’s service. When your app shows a Google Map, translates text, reads a Google Sheet, uploads a file to Cloud Storage or asks Gemini a question, it is calling a Google API behind the scenes.

Google has hundreds of these APIs, but in a new project almost all of them are switched off. Google does this on purpose: an API you never use can’t be misused or bill you by mistake. So before your code can call any API, someone has to go to APIs & Services and enable it.

Simple definition: APIs & Services is the control room of a Google Cloud project. It decides which Google APIs your project is allowed to use, gives your apps the keys to call them, and shows you who is calling them and how often.

A simple real-life comparison

Think of a new flat. The building has electricity, water, gas and internet, but each connection is off until you apply for it. APIs & Services is the society office where you switch on the connections you need (enable APIs), collect the keys and access cards for your family (credentials), and see the monthly meter readings (metrics and quotas).

Where to find it in the console

Open the Google Cloud Console, select your project at the top, then click the ☰ menu → APIs & Services. You can also type “APIs & Services” in the search bar.

What You Find Inside APIs & Services

PageWhat it doesWhen you open it
Enabled APIs & servicesDashboard of APIs that are on, with traffic, errors and latency graphs.To check usage, errors, or disable an API.
LibraryCatalogue of all Google APIs you can enable (Maps, Gemini, Sheets, Drive, BigQuery, Vision and hundreds more).When your app needs a new Google service.
CredentialsCreate and manage API keys, OAuth 2.0 client IDs and service accounts.When your app needs a key or login to call an API.
Quotas & system limitsHow many requests per minute/day each API allows, and requests to raise limits.When you get “quota exceeded” (HTTP 429) errors or want to cap usage.
Google Auth PlatformConsent screen branding, audience (test users), OAuth clients and data access scopes.When you add “Sign in with Google” or access user data.
Domain verification / Page usage agreementsProve you own a domain, and review terms for certain APIs.Mostly for webhooks and published OAuth apps.

Note for readers of older tutorials: the “OAuth consent screen” used to be a page inside APIs & Services. Google announced in April 2025 that the OAuth configuration pages moved to their own section called Google Auth Platform, with tabs such as Branding, Audience and Clients. If a video tells you to click “OAuth consent screen” and you can’t find it, this is why.

API Key vs OAuth Client ID vs Service Account

This is where most beginners get confused. The Credentials page offers three kinds of “keys”, and each one answers a different question: who is calling the API?

CredentialIdentifiesTypical useExample
API keyYour app or project (not a person)Public data APIs that only need to know which project to billShowing Google Maps in an Android app
OAuth 2.0 client IDA real user who logs in and gives permission“Sign in with Google”, or reading a user’s Drive/Gmail/CalendarA web app that lets users log in with their Google account
Service accountA server or program (robot account)Backend code calling Google Cloud APIs with IAM permissionsA Cloud Run API reading a Google Sheet or writing to BigQuery

Quick rule I follow: if a user is involved, use OAuth. If only your server is involved, use a service account. Use an API key only for APIs that say they accept API keys, and always restrict it. Google itself recommends moving away from API keys to IAM and short-lived service account credentials wherever an API supports that. For more about robot accounts, read our Service Account guide, and for permissions see Google Cloud IAM.

When to Use APIs & Services

✅ You need APIs & Services when:

  • You get an error like SERVICE_DISABLED or “API has not been used in project … before or it is disabled”. This is the most common reason people land on this page.
  • Your app needs a Google service for the first time: Maps, Places, Gemini, Translation, Vision, YouTube Data, Sheets, Drive, Gmail, Calendar and so on.
  • You want to add “Sign in with Google” to a website or app.
  • You need an API key for an Android, iOS or web app.
  • You want to see how many requests each API gets, which ones fail, and how slow they are.
  • You want to limit usage so a bug or an attacker can’t run up a huge bill (quotas).
  • You want to switch off APIs you no longer use, to reduce risk.

❌ You don’t need it for:

  • Building your own API for your app. APIs & Services manages Google’s APIs. Your own API runs on Cloud Run, Cloud Functions or App Engine (and you can put API Gateway or Apigee in front of it).
  • Giving a person access to your project. That is done in IAM, not here.
  • Day-to-day data work inside a service (for example running a BigQuery query). Once the API is on, you work inside that service’s own page.

Where APIs & Services Is Used

Practically every real project touches APIs & Services at least once. These are the places I see it used most:

  1. Mobile apps: Maps SDK for Android/iOS, Places autocomplete, Firebase services, Play Integrity.
  2. Websites: Maps JavaScript API on a “Contact us” page, reCAPTCHA, “Sign in with Google”.
  3. Backend services: Cloud Run or Cloud Functions calling Sheets, Drive, Gmail, Pub/Sub, Firestore or Cloud SQL Admin APIs.
  4. AI features: enabling the Vertex AI / Gemini, Vision, Speech-to-Text or Translation APIs.
  5. Data engineering: BigQuery, Dataflow, Dataproc and Cloud Storage APIs must be enabled before pipelines run. See our Dataflow and Dataproc guides.
  6. CI/CD and automation: Cloud Build, Artifact Registry and Cloud Run Admin APIs are enabled once per project, usually with the Google Cloud SDK.
  7. Cost and security reviews: auditors open this page to find unused APIs and unrestricted API keys.

How to Enable an API and Create Credentials

Let’s do it both ways: by clicking in the console (good for beginners) and with commands (good for automation).

Step 1: Select or create a project

At the top of the console, click the project picker. Choose an existing project or click New Project, give it a name (for example property-app-prod) and click Create. Every API, key and quota belongs to one project, so double-check the project name before you continue. Being in the wrong project was exactly my “grey map” mistake.

Step 2: Enable an API from the Library

  1. Go to APIs & Services → Library.
  2. Search for the API, for example Maps SDK for Android.
  3. Click it, then click Enable. For paid APIs, Google asks you to link a billing account first.

With the command line, the same thing is one line:

# See which APIs are already on
gcloud services list --enabled

# Find the exact service name
gcloud services list --available --filter="name:maps"

# Enable one or more APIs
gcloud services enable maps-android-backend.googleapis.com places.googleapis.com

Step 3: Create an API key (and restrict it)

  1. Go to APIs & Services → Credentials.
  2. Click + Create credentials → API key. A new key appears.
  3. Click Edit API key straight away and add two kinds of restrictions:
    • Application restrictions: who can use the key: websites (HTTP referrers), IP addresses, Android apps (package name + SHA-1) or iOS apps (bundle ID).
    • API restrictions: which APIs the key can call. Tick only the ones you need.
  4. Click Save. Restrictions can take a few minutes to apply.

Google’s own documentation calls restricting API keys a best practice. Restrictions make sure only your apps and websites can use the key. An unrestricted key is like leaving your house key under the doormat with your address written on it.

Command-line version:

gcloud services api-keys create \
  --display-name="Property app - Android maps" \
  --api-target=service=maps-android-backend.googleapis.com \
  --allowed-application=sha1_fingerprint=AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD,package_name=com.example.propertyapp

# List keys and read the key string
gcloud services api-keys list
gcloud services api-keys get-key-string KEY_ID

Step 4: Create an OAuth client ID (for “Sign in with Google”)

  1. Go to Google Auth Platform (search for it, or open it from the APIs & Services menu). Click Get started if this is your first time.
  2. Branding: enter the app name, support email and logo that users will see on the consent screen.
  3. Audience: choose External for public users (or Internal for a Google Workspace organisation only). While the app is in testing, add your test users’ email addresses here.
  4. Clients → Create client: choose the application type (Web application, Android, iOS, Desktop). For a web app, add your Authorized JavaScript origins (for example https://www.example.com) and Authorized redirect URIs.
  5. Copy the Client ID. For web apps you also get a Client secret: keep that on your server only, never in browser code.

If you use Firebase, our Firebase Authentication guide shows how Firebase creates and uses these OAuth clients for you.

Step 5: Create a service account (for backend code)

gcloud iam service-accounts create listings-backend \
  --display-name="Listings backend"

# Give it only the role it needs, for example writing to BigQuery
gcloud projects add-iam-policy-binding property-app-prod \
  --member="serviceAccount:listings-backend@property-app-prod.iam.gserviceaccount.com" \
  --role="roles/bigquery.dataEditor"

When this service account is attached to Cloud Run or Cloud Functions, your code gets credentials automatically. No key file needed.

Step 6: Watch metrics and set quotas

Open APIs & Services → Enabled APIs & services and click any API. You’ll see graphs for traffic, errors (by response code) and latency, plus a breakdown by credential. Then open Quotas & system limits and lower the “requests per day” limit for expensive APIs. If a bug in your app suddenly loops 1 lakh times, the quota stops it before your bill does.

Real-Time Example: Property Listing App

Business scenario: A real-estate startup in Pune is building a property rent/sale app. They need:

  • A map in the Android app showing each flat’s location.
  • Address autocomplete when an owner posts a new listing.
  • “Sign in with Google” on the owner web dashboard.
  • A backend on Cloud Run that stores listings and copies daily enquiries into a Google Sheet for the sales team.
Android app ── API key (restricted) ──► Maps SDK for Android + Places API
Owner web dashboard ── OAuth client ID ──► Sign in with Google
Cloud Run backend ── service account ──► Firestore + Google Sheets API
                         all controlled from ► APIs & Services

Step 1: Enable every API the project needs

gcloud config set project property-app-prod

gcloud services enable \
  maps-android-backend.googleapis.com \
  places.googleapis.com \
  run.googleapis.com \
  firestore.googleapis.com \
  sheets.googleapis.com

Step 2: Two separate, restricted API keys

One key per app and per purpose. If one leaks, you replace just that one.

# Get your app's SHA-1 (debug key shown; use your release/Play signing key for production)
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android

# Key 1: Android maps + places, only from our app
gcloud services api-keys create \
  --display-name="Android - maps and places" \
  --api-target=service=maps-android-backend.googleapis.com \
  --api-target=service=places.googleapis.com \
  --allowed-application=sha1_fingerprint=YOUR_SHA1,package_name=com.pune.propertyapp

Important: if your app is on the Play Store with Play App Signing, add the App signing key SHA-1 from Play Console → Setup → App integrity. Otherwise the map works in testing but shows grey for real users. Ask me how I know.

Step 3: Use the key in the Android app

Keep the key out of Git. Put it in local.properties and use the Secrets Gradle Plugin:

# local.properties (not committed)
MAPS_API_KEY=AIzaSy...your_key...

<!-- AndroidManifest.xml, inside <application> -->
<meta-data
    android:name="com.google.android.geo.API_KEY"
    android:value="${MAPS_API_KEY}" />
// ListingMapActivity.kt
class ListingMapActivity : AppCompatActivity(), OnMapReadyCallback {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_listing_map)
        val mapFragment = supportFragmentManager
            .findFragmentById(R.id.map) as SupportMapFragment
        mapFragment.getMapAsync(this)
    }

    override fun onMapReady(map: GoogleMap) {
        val flat = LatLng(18.5590, 73.7868)   // 2 BHK, Baner, Pune
        map.addMarker(MarkerOptions().position(flat).title("2 BHK - ₹28,000/month"))
        map.moveCamera(CameraUpdateFactory.newLatLngZoom(flat, 15f))
    }
}

Step 4: “Sign in with Google” for the owner dashboard

In Google Auth Platform, set Branding (app name “Pune Homes Owner Portal”, support email), Audience (External, add 3 test owners), then create a Web application client with origin https://owners.punehomes.in. Then the web page needs only this:

<script src="https://accounts.google.com/gsi/client" async></script>

<div id="g_id_onload"
     data-client_id="1234567890-abc123.apps.googleusercontent.com"
     data-callback="onGoogleLogin"></div>
<div class="g_id_signin" data-type="standard"></div>

<script>
  function onGoogleLogin(response) {
    // Send the ID token to the backend; the backend verifies it
    fetch("/api/login", {
      method: "POST",
      headers: {"Content-Type": "application/json"},
      body: JSON.stringify({ credential: response.credential })
    });
  }
</script>

Step 5: Backend copies daily enquiries to Google Sheets (service account)

No API key here. The Cloud Run service runs as the listings-backend service account. Share the Google Sheet with that service account’s email (Editor access), just like sharing with a colleague.

# enquiries_to_sheet.py
import google.auth
from googleapiclient.discovery import build

SHEET_ID = "1AbCdEfGh...yourSheetId"

creds, _ = google.auth.default(
    scopes=["https://www.googleapis.com/auth/spreadsheets"]
)
sheets = build("sheets", "v4", credentials=creds)

def push_enquiries(rows):
    """rows = [["2026-11-19", "Rahul", "98xxxxxx10", "2 BHK Baner"], ...]"""
    sheets.spreadsheets().values().append(
        spreadsheetId=SHEET_ID,
        range="Enquiries!A:D",
        valueInputOption="USER_ENTERED",
        body={"values": rows},
    ).execute()
gcloud run deploy listings-api \
  --source=. \
  --region=asia-south1 \
  --service-account=listings-backend@property-app-prod.iam.gserviceaccount.com

Step 6: Protect the budget with quotas

In APIs & Services → Enabled APIs & services → Places API → Quotas, the team lowers the daily request limit to what they expect plus a safety margin. They also add a budget alert in Billing. A week after launch, a bug in the search screen started calling autocomplete on every single keystroke. The quota blocked it at the limit, the graphs in APIs & Services showed the spike, and the developer fixed it with a 300 ms debounce. Without the quota, that bug would have been an expensive lesson.

What the team gained

  • Every Google API they use is listed in one place, with live traffic graphs.
  • Each credential does exactly one job and can be replaced without touching the others.
  • Stolen keys are useless outside their app, and quotas cap the damage from bugs.
  • The sales team gets enquiries in a Google Sheet every day without anyone sharing a password.

Pricing

Using the APIs & Services pages, enabling APIs and creating credentials is free. You pay for what each API charges when you actually call it. Many APIs are free (Sheets, Drive, Gmail within normal limits), some have a free monthly allowance (Maps Platform, Translation, Vision), and Google Cloud infrastructure APIs bill for the resources you create. Always check the pricing page of the specific API and set a billing budget alert.

Best Practices and Common Mistakes

Best practices for APIs & Services

  • Enable only what you use, and disable APIs you no longer need.
  • Restrict every API key by application and by API.
  • One key per app and per environment (dev, staging, prod), with clear display names.
  • Prefer service accounts over API keys for server code, and avoid downloading JSON key files.
  • Rotate keys regularly: create a new one, update the app, delete the old one.
  • Set quotas and budget alerts for paid APIs.
  • Use separate projects for dev and prod so test traffic never touches production quotas.
  • Request the narrowest OAuth scopes. Ask for read-only if you only read.

Common mistakes I have seen

  • API enabled in one project, key created in another. Both must be in the same project.
  • Committing API keys to GitHub. Bots scan public repos for keys within minutes.
  • Forgetting the Play App Signing SHA-1, so Maps works in debug but not for Play Store users.
  • Putting the OAuth client secret in front-end code. It belongs on the server only.
  • Leaving the OAuth app in “Testing” and wondering why new users can’t log in (only listed test users can).
  • Expecting changes instantly. Enabling an API or editing key restrictions can take a few minutes.

Interview Questions on Google Cloud APIs & Services

  1. What is APIs & Services in GCP? The console section to enable/disable Google APIs, manage credentials, and monitor usage and quotas for a project.
  2. Why are most APIs disabled by default? To reduce security risk and accidental cost. You enable only what the project needs.
  3. API key vs OAuth client ID vs service account? API key identifies the project/app; OAuth identifies a consenting user; a service account identifies a workload with IAM roles.
  4. How do you secure an API key? Application restrictions plus API restrictions, separate keys per app, rotation, and never committing them to source control.
  5. How do you enable an API from the command line? gcloud services enable SERVICE_NAME.googleapis.com.
  6. What does a 429 error usually mean? A quota or rate limit was exceeded; check Quotas & system limits.
  7. Where is the OAuth consent screen now? In Google Auth Platform (Branding, Audience, Clients, Data access).

Frequently Asked Questions

Is Google Cloud APIs & Services free?

Yes. Enabling APIs and creating credentials costs nothing. You only pay for the API calls or resources that each API charges for.

How do I fix “API has not been used in project before or it is disabled”?

Open APIs & Services → Library in the same project shown in the error, search for the API named in the message, click Enable, wait a couple of minutes and try again.

Can I create my own API in APIs & Services?

No. This page manages Google’s APIs. You build your own API on Cloud Run, Cloud Functions or App Engine, and you can manage it with API Gateway or Apigee.

What happens if I disable an API?

Any app calling it immediately starts getting errors, and for some services the related resources may stop working. Check the metrics page for recent traffic before disabling anything.

Is it safe to put an API key in an Android app?

For APIs designed for client use (like Maps SDK), yes, as long as the key is restricted to your app’s package name and SHA-1 and to only the APIs it needs. Never put a service account key or OAuth client secret in an app.

Conclusion

Google Cloud APIs & Services is the first stop for almost every GCP project. Use the Library to switch on the Google APIs you need, the Credentials page to give each app the right kind of key, Google Auth Platform for user login, and the metrics and quotas pages to keep an eye on usage and cost. Get these basics right and most “it works on my laptop but not in production” problems simply disappear.

My advice: open APIs & Services in your own project today, look at the list of enabled APIs, disable anything you don’t recognise, and add restrictions to any API key that has none. It takes ten minutes and could save you from a very bad surprise. For the full reference, see the official Google Cloud documentation on managing API keys.

Leave a Comment