All Collections
GeoGrid Search
Widgets API Keys security
Widgets API Keys security

Secure your widget API keys to avoid being charged for what you have not requested

S
Written by Sebastian Donnelly
Updated over a week ago

If you're going to embed our GeoGrid or GeoBooster widgets into a website, you'll need a project with Google Maps Javascript API and Places API enabled in your Google Cloud Console.

When you use API keys in your Google Cloud Platform applications, take care to keep them secure. Publicly exposing your credentials can result in your account being compromised, which can lead to unexpected charges.

API keys act like an ID card for the client making an API request, helping APIs assign the proper access permissions and track how their data are being used.

When you first create your API keys, apply a restriction that limits the usage to one or more Google Maps Platform APIs.

Go to the left side Navigation menu, select 'APIs & Services', 'Credentials' and select the key you want to restrict. The simplest solution would be to whitelist the domain of the website this widget will be embedded into.

Only requests to use APIs associated with an API key will be processed. For any given API key, you can specify as many API restrictions as needed. You can specify the allowed APIs for each key from the GCP Console Credentials page and then create a new API key with the settings you want, or edit the settings of an existing API key.

Some Google APIs charge for usage, and you need to enable billing before you can start using these APIs. Billing is enabled at the project level, not the API level. Connecting your credit card to a billing account doesn't mean you'll get charged - the free limits Google provides are quite enough.

Enabling billing for the APIs that your projects use also has other advantages:

  • Some APIs allow free usage up to a courtesy usage limit, and in some cases this free limit is increased when you enable billing.

  • For some APIs, more services are available after you enable billing.

Did this answer your question?