Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Create API Key

The API key is a unique identifier that authenticates requests associated with your project for usage and billing purposes. You must have at least one API key associated with your project.

To create an API key:

  1. Log into your Google account.

  2. Go to the Google Maps Platform > Credentials page.

    Go to the Credentials page

  3. On the Credentials page, click Create credentials > API key.
    The API key created dialog displays your newly created API key.

    Click Close.
    The new API key is listed on the Credentials page under API keys.
    (Remember to restrict the API key before using it in production.)

Restrict API Key

Restricting API keys adds security to your application by ensuring only authorized requests are made with your API key. We strongly recommend that you follow the instructions to set restrictions for your API keys. For more information, see API security best practices.

To restrict an API key:

  1. Log into your Google account.

  2. Go to the Google Maps Platform > Credentials page.

    Go to the Credentials page

  3. Select the API key that you want to set a restriction on. The API key property page appears.

  4. Under Key restrictions, set the following restrictions:

    • Application restrictions:

      1. To accept requests from the list of web server IP addresses that you supply, select IP addresses (web servers, cron jobs, etc.) from the list of Application restrictions.

      2. Specify one IPv4 or IPv6 address or a subnet using CIDR notation (e.g. 192.168.0.0/22). If you need to enter another entry, a new box appears after you complete adding the previous entry.

    • API restrictions:

      1. Click Restrict key.

        1. Select Places API from Select APIs dropdown. If the Places API is not listed, you need to enable it.

        2. Select …

  5. To finalize your changes, click Save.

  6. Make a copy of your API key and keep it safe.

  • No labels