Google Maps API keys for 6amTech scripts

Which Google Maps Platform APIs 6amTech scripts use, how to create and restrict client and server keys, where they go in the apps and admin panel, and how to avoid surprise bills.

Rich Labs teamPublished 4 min read

Maps are central to every 6amTech platform: customers drop a pin for their address, stores and providers set their location, zones are drawn on a map, and drivers and delivery men navigate and get tracked. When Maps fail, nothing works, and when they're set up carelessly, the bill can surprise you. Here's how we configure Google Maps Platform for 6amMart, DriveMond, Demandium and 6Valley.

Which APIs are involved

Exact requirements depend on your script and version, so check the docs. Typically you'll enable:

Enable only what your version actually calls. Every enabled API is another possible source of cost.

Step 1: create a Google Cloud project with billing

Create a project in Google Cloud Console in your own company's account, not a freelancer's. Link a billing account. Maps Platform requires billing to be active even if your usage stays within the free allowance. Pricing and free allowances change over time, so check Google's current Maps Platform pricing page for each API you use.

Step 2: separate keys for separate jobs

Use different keys for different places, each restricted properly:

Also restrict each key to only the APIs it needs. 6amTech admin panels usually ask for a client-side and a server-side map key. Put the browser key and the server key in the matching fields.

Step 3: where the keys go

After changing keys in the apps, rebuild them. Keys are compiled into the build.

Step 4: set budgets and quotas

Before launch:

  1. Set a budget alert on the billing account, with emails at several thresholds.
  2. Set daily quotas per API in the Cloud Console, so a bug or an abusive client can't run up unlimited calls.
  3. Check the Maps Platform metrics weekly at first to see which APIs are actually used.

Step 5: reduce calls without hurting the product

Some of these are configuration and some are small code optimisations worth doing once order volume grows.

Troubleshooting: map not showing or blank grey map

Ownership and access

Keep the Google Cloud project, billing account and API keys in your company's name, with at least two people from your company as owners. If a freelancer or agency sets it up, add them as a user with limited permissions, and remove access when the work is done. Losing access to the project that holds your production keys is a painful way to find out who owned it.

How we help

Maps setup, key restriction and budget alerts are part of every installation we do for ride-hailing, delivery and home services platforms. See also our DriveMond setup guide.

Questions

Why is the map blank in my 6amMart app?

Most often the Android key restriction is missing the SHA-1 fingerprint of the Play App Signing key, or the Maps SDK isn't enabled for the key.

Which Google Maps APIs does 6amMart need?

Typically the Maps SDKs for Android and iOS, Maps JavaScript, Places, Geocoding, and Distance Matrix or Directions/Routes. Check your version's docs.

How do I prevent a huge Google Maps bill?

Restrict every key, set daily quotas per API, set budget alerts, and reduce repeated geocoding and autocomplete calls.

Should I use one API key for everything?

No. Use separate keys for Android, iOS, browser and server, each restricted to its platform and only the APIs it needs.

Want us to do this for you?

Talk directly to the developers who've launched these platforms. You get a fixed quote and written milestones.

Related guides

WhatsApp