You're all set!

To start developing, please head over to our developer documentation.

Activate the Google Maps JavaScript API

To get you started we'll guide you through the Google Developers Console to do a few things first:

  1. Create or choose a project
  2. Activate the Google Maps JavaScript API and related services
  3. Create appropriate keys
Continue

Error Messages


The Google Maps JavaScript API writes error and warning messages to window.console . The following tables list the possible error codes returned by the Google Maps JavaScript API, with a description of the cause and how you can fix the problem. For help on finding the error messages, see the section on checking errors in your browser.

Google Maps JavaScript API Error Codes

If you encounter an error while loading the Google Maps JavaScript API, please see the table below to find explanations for the error codes.

Error Code Message Description
InvalidKeyOrUnauthorizedURLMapError The provided Google API key is invalid or this site is not authorized to use it.

The API key included in the script element that loads the API is invalid, or the current URL loading the Google Maps JavaScript API has not been added to the list of allowed referrers. You may need to enable the Google Maps JavaScript API under APIs in the Google API Console.

See Obtaining an API key.

NotLoadingAPIFromGoogleMapError The Google Maps JavaScript API must be downloaded directly from Google's servers.

The script element that loads the Google Maps JavaScript API is not being included correctly on your page. In order for the API to work correctly, it must be loaded directly from https://maps.googleapis.com.

See Loading the Maps API.

TOSViolationMapError This website appears to violate the Google Maps API Terms of Service. The Google Maps API has been disabled for this website.

Your application was blocked for non-compliance with the Google Maps APIs Terms of Service, following several email notifications. To appeal the block and have your implementation reviewed, please complete this form. You will receive a response via email within a few business days.

If you have a Google Maps APIs Premium Plan license, please use your Google Maps APIs Premium Plan credentials to resolve this error. See the guide to API keys and client IDs.

UnauthorizedURLForClientIdMapError This URL is not authorized to use the Google Maps Client ID provided.

The Premium Plan or Maps APIs for Work client ID included in the script load is invalid, expired, or the current address loading the Google Maps JavaScript API has not been added to the list of authorized URLs.

See Registering Authorized URLs.

Google Maps JavaScript API Error Codes for Developers

If you find an error on Chrome JavaScript Console, Firefox Web Console or any other equivalent tools on your browsers, please see the table below to find explanations for the error codes.

There are 2 types of error codes, errors and warnings. An error indicates a severe issue which occurred while loading the Google Maps JavaScript API. Your page cannot load the API correctly, and the API will not work on that page. A warning is a supplemental message about the loading of the Google Maps JavaScript API. The warning describes the possible reasons for an error, or suggests potential issues in your code that loads the Google Maps JavaScript API. If you receive only warnings without any errors, the API will work correctly on that page. But we recommend that you fix the potential issues as well.

Developer Error Code Type Description
ApiNotActivatedMapError Error

The Google Maps JavaScript API is not activated on your API project. You may need to enable the Google Maps JavaScript API under APIs in the Google API Console.

See Obtaining an API key.

DeletedApiProjectMapError Error

Your API project may have been deleted from the Google API Console. Please check the project for which you generated the API key that's included in JavaScript API loader. You can create a new API project and get a new key on the Google API Console.

See Obtaining an API key.

ExpiredKeyMapError Error

The API key included in the script element that loads the API has expired. You may need to generate a new API key in the Google API Console.

See Obtaining an API key.

InvalidClientIdMapError Error

The client ID included in the script element that loads the API is invalid, or expired. Please make sure you are using your client ID correctly. The client ID should start with "gme-" prefix. If you see this error even when using your client ID correctly, the client ID may have expired. Please contact your Google Account Manager.

If you do not have a Premium Plan or Maps APIs for Work license, you need to use a key parameter with your API key instead of the client parameter.

See Your client ID.

InvalidKeyMapError Error

The API key included in the script element that loads the API is not found. Please make sure you are using a correct API key. You can generate a new API key on the Google API Console.

See Obtaining an API key.

MissingKeyMapError Error

The script element that loads the API is missing the required authentication parameter. If you are using the standard Maps JavaScript API, you must use a key parameter with a valid API key. If you are a Premium Plan customer, you must use either a client parameter with your client ID or a key parameter with a valid API key.

See the guide to API keys and client IDs.

ProjectDeniedMapError Error

Your request has not been completed. You may be able to find the more details about the error in the Google API Console.

See Google API Console.

RefererDeniedMapError Error

Your application was blocked for non-compliance with the Google Maps APIs Terms of Service, following several email notifications. To appeal the block and have your implementation reviewed, please complete this form. You will receive a response via email within a few business days.

RefererNotAllowedMapError Error

The current URL loading the Google Maps JavaScript API has not been added to the list of allowed referrers. Please check the referrer settings of your API key on the Google API Console.

See API keys in the Google API Console. For more information, see Best practices for securely using API keys.

OverQuotaMapError Error

The number of requests has exceeded the usage limits for the Google Maps JavaScript API. Your app's requests will work again at the next daily quota reset.

For more details, see the guide to usage limits. The page also explains how you can get higher usage limits.

ClientIdLooksLikeCryptoKey Warning

You may have supplied a cryptographic key in the client parameter. If you have a Premium Plan or Maps APIs for Work license, please specify your client ID as the client parameter. You don't need to use your cryptographic key for the Google Maps JavaScript API.

See the guide to client IDs for Premium Plan and Maps APIs for Work customers.

ClientIdLooksLikeKey Warning

You may have supplied an API key in the client parameter. If you have a Premium Plan or Maps APIs for Work license, please specify your client ID as the client parameter. If you have a Google Maps APIs Premium Plan, you can use a client parameter or a key parameter. If you don't have any licenses, you must use a key parameter, instead of a client parameter.

See the guide to client IDs and API keys.

InvalidChannel Warning

You may have supplied an invalid channel parameter. The channel must be an ASCII alphanumeric string, which may include period (.), underscore (_) and hyphen (-). Please make sure that you are specifying a valid channel parameter.

See Reporting | Google Maps APIs Premium Plan.

InvalidClientId Warning

The client parameter doesn't seem to contain a correct client ID. A client ID should start with "gme-".

See the guide to client IDs for Premium Plan or Maps APIs for Work customers.

InvalidKey Warning

The API key included in the script element that loads the API does not look correct. Please make sure you are using a correct API key. You can generate a new API key on the Google API Console.

See Obtaining an API key.

InvalidVersion Warning

You may have supplied an incorrect version number in your script element. Please make sure you are using a correct version number.

See Versioning | Google Maps JavaScript API.

KeyLooksLikeClientId Warning You may have supplied a client ID as a key parameter. If you have a Premium Plan or Maps APIs for Work license, please specify your client ID as a client parameter instead of the key parameter. If you have a Google Maps APIs Premium Plan, you can use a client parameter or a key parameter. If you don't have any licenses, you must use a key parameter, instead of a client parameter.

See the guide to client IDs and API keys

KeyLooksLikeCryptoKey Warning

You may have supplied a cryptographic key as a key parameter. If you have a Premium Plan or Maps APIs for Work license, please specify your client ID as a client parameter, and remove the key parameter from your script element. The cryptographic key is not required for the Google Maps JavaScript API. If you have a Google Maps APIs Premium Plan, you can use a client parameter or a key parameter. If you don't have any licenses, you can get a free API key from the Google API Console.

See the guide to client IDs and API keys

KeyLooksLikeProjectNumber Warning

You may have supplied a project number as a key parameter. Please make sure you are using a correct API key. You can generate a new API key on the Google API Console.

See Obtaining an API key.

NoApiKeys Warning

The script element that loads the API has no API key. Please make sure you include a valid API key as a key parameter. You can generate a new API key on the Google API Console.

See Obtaining an API key.

RetiredVersion Warning

You may have supplied a retired version in your script element. The versions 3.0 - 3.24 have been retired, and you might be receiving 3.25 instead. Please update your application to use one of the available versions.

See Versioning | Google Maps JavaScript API.

SensorNotRequired Warning

The sensor parameter is no longer required for the Google Maps JavaScript API. It won't prevent the Google Maps JavaScript API from working correctly, but we recommend that you remove the sensor parameter from the script element.

SignatureNotRequired Warning

The signature parameter is not required for the Google Maps JavaScript API. It won't prevent the Google Maps JavaScript API from working correctly, but it may introduce security risks. Please remove it from your script element.

SignedInDeprecated Warning

The signed_in parameter is deprecated and will be ignored in future versions of the Google Maps JavaScript API. It won't prevent the Google Maps JavaScript API from working after signed-in mode has retired, but the behavior of your application may change, if you rely on current signed-in features.

Please review your application and see Signed-in Maps | Google Maps JavaScript API for details about the upcoming changes.

UrlAuthenticationCommonError Error

An error has occurred that doesn't fit into the other categories on this page. This could be caused by a temporary problem. Please retry the request after a short delay. If that doesn't solve the problem, please review the developer's guide to make sure the request has the proper format.

Checking Errors in Your Browser

The Google Maps JavaScript API writes error messages to window.console. This section explains how you can check the window.console output in Google Chrome. If you are using any other browsers, please check the developer documentation for your browser. For your reference, this is a list of tools to check window.console output in some other browsers.

In Chrome, you can use the JavaScript Console to check window.console output as follows.

  1. To open the Developer Tools, select the menu icon > More Tools > Developer Tools.
  2. To open the JavaScript Console, press the ESC key on your keyboard. The ESC key will toggle the JavaScript Console. If you close the console, press the ESC key again to open it.

If any errors or warnings occurred when loading the Google Maps JavaScript API, they appear as one or more lines in the console. An error or warning message has the following format:

Google Maps API error: [ERROR CODE] [Link to API document]
or
Google Maps API warning: [ERROR CODE] [Link to API document]

You can check the error codes table above to find the error code in the error message. You can also find the details about the error message in the API document linked from the message.

Note: You can listen for authentication errors programmatically.

Send feedback about...

Google Maps JavaScript API
Google Maps JavaScript API
Need help? Visit our support page.