Knowledge Base

API Key Restriction Guide: Enhancing Security and Control for Google Maps Platform

This documentation provides instructions on how to properly restrict your API keys to enhance security and control the usage of Google Maps Platform APIs, SDKs, and services. Restricting API keys involves applying application restrictions and API restrictions. By following these best practices, you can ensure that your API keys are used only by authorized sources and for specific purposes.

Application Restriction

Application restrictions allow you to limit the usage of an API key to specific platforms, websites, or IP addresses. By adding application restrictions, you can authorize requests originating only from these specified sources. It is important to note that when you apply an application restriction to an API key, it can no longer be used on other platforms. For example, if you restrict an API key to only Android apps, it cannot be used with iOS, web services, or JavaScript APIs.

To set an application restriction for an API key, follow these steps:

  1. Open the Google Cloud Console and navigate to the Google Maps Platform Credentials page.
  2. Select the API key that you want to restrict.
  3. On the “Edit API key” page, locate the “Key restrictions” section and select “Set an application restriction.”
  4. Choose IP address as the restriction type, currently, this is the only restriction supported by Leadinary now.
  • IP address: Leadinary server IP is 34.226.111.215

Click “Save” to apply the application restriction to the API key.

After following these steps, the specified restrictions become part of the API key definition. It is crucial to provide accurate details and click “Save” to ensure that your API key restrictions are properly applied. For more information, consult the “Get an API Key” guide in the documentation of the specific API or SDK you are interested in.

What are your feelings

Knowledge Base