Why set API restrictions?

AEO Service Forum Drives Future of Data Innovation
Post Reply
mstlucky8072
Posts: 30
Joined: Mon Dec 09, 2024 3:40 am

Why set API restrictions?

Post by mstlucky8072 »

We should not share the generated API key publicly, as it can be used by unauthorized persons. We should not provide our Google API key in the source of the page or HTML code. The key remains active and valid until the created project or Google account is deleted.

How do I lock my API key?
An important task after creating an API key is to properly secure it. To do this, we select our newly created API key from the list.

Select API key to secure

Select API key to secure

In the view that appears, we have the option to set the API interface restriction for our key. In the first field, we can give it a custom name.

Website Access Restrictions
Setting API Restrictions

Setting API Restrictions

Below we have the application restriction settings field, where by selecting appropriately:

None – There are no restrictions on API key usage.
Sites - If the API key will be used on sites, this option should be selected. It allows you to specify the specific pages on which it will be used. We can specify any number of pages by adding http or https referrers (if we have SSL).
IP addresses - similar to the website, except that instead of domains, we provide IP addresses from which we will connect to the Google API service.
Android Apps - Limits key usage to selected Android apps.
iOS Apps - Same as Android Apps, only for iOS Apps.
API Limitations
We also have the option to restrict an API key to the interfaces that the key can call. The default is "Do not restrict key", to restrict the key to specific interfaces, we select the "Restrict key" option.

Google API Key - Interface Restriction

Google API Key - Interface Restriction

Then, from the field that appears, we select the interfaces skype database that our application will use. This will allow us to further limit the use of the key by unauthorized applications.

Image


Restrictable interfaces

Restrictable interfaces

Google Map using Google Maps API
Many businesses may need to add their own personalized Google map to their website. A separate Google Maps API can be used for this purpose.

Thanks to Google Maps API we can create personalized Google Maps , on which we will present, for example, all the points of our chain of stores, add bubbles to pins on the map, or personalize colors that will be more consistent with our website. Such a Google Map will probably attract many more conversions than the standard one.

Google Maps Platform Dashboard View

Google Maps Platform Dashboard View

If you want to help your customers fill in the address when placing an order on your website, you can also use the Google Maps API.

Address suggestions via Google Maps API

Address suggestions via Google Maps API

Summary
By using the features that Google gives us using a Google API key, we can attract many more customers. By adding personalized Google Maps to our website, we can help customers when placing an order in our store, easily designate a route to our company, and also adjust the appearance of Google Maps to the graphic design of our website.

Additionally, we can create our own applications that will streamline the work of our company. Our agency created the Easy Local application , which allows for mass management of company profiles in Google Maps.

The Google API key offers a ton of possibilities. That's why it's worth delving into what we can do with it. Many companies will probably find a use that will significantly speed up processes.
Post Reply