This page describes the error messages that can be returned by the
Maps Embed API. When an error occurs, the
Maps Embed API presents error message text in place of the map.
Certain error conditions may also occur, which result in the display of a
darkened watermarked map.

## Invalid requests

In the case of an invalid request, the Maps Embed API returns
an HTTP `4xx` status code and a message describing the
problem. Below are examples of error conditions. Note: This is not
a complete list of the possible errors. Check the actual error code
and message returned by the API for details of specific problems.

| Example of error condition | Status code |
|---|---|
| The request includes an invalid parameter, or a required parameter is missing. For example, the `zoom` parameter is not within the expected range of numeric values, or a required parameter is missing from the request. | `400 BAD REQUEST` |
| The API key included in the request is invalid. | `403 FORBIDDEN` |

## API key and quota errors

API key and quota errors are treated as invalid requests. Possible causes
include the following:

- Missing or invalid API key. To resolve this error, ensure that your request includes a valid API key. [Get an API key](https://developers.google.com/maps/documentation/embed/get-api-key.md.txt#get-an-api-key).
- Maps Embed API is not enabled for your project. Learn about [enabling and disabling APIs](https://cloud.google.com/apis/docs/enable-disable-apis).
- API key has a restriction violation. [Read
  more about API key best practices](https://developers.google.com/maps/api-key-best-practices).

## Billing and HTTP referer errors

A darkened map, or "negative" Street View image, watermarked with ￼"for
development purposes only" is returned when any of the following is true:

- Billing has not been enabled on your account. [Enable billing](https://console.cloud.google.com/project/_/billing/enable?utm_source=Docs_BillingNudge).
- The provided billing method is invalid (for example an expired credit card). To resolve this, visit the [Google Cloud console, and ensure that you have provided a valid method of payment.](https://console.cloud.google.com/project/_/billing)
- A self-imposed daily limit has been exceeded. [Learn how to view or change daily billable limits](https://developers.google.com/maps/documentation/embed/usage-and-billing.md.txt#set-caps).
- The request is missing an HTTP referer, and you are using a referer-restricted API key. [Learn
  more about adding referers](https://developers.google.com/maps/api-key-best-practices).

## Check errors in your browser

For Billing and HTTP referer errors, the Maps Embed API writes
error messages to `window.console`. For invalid requests (including
API key and quota errors), only the HTTP `4xx` status code is reported
in the console. This section explains how you can check the 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 console output in some other browsers.

- [Console](https://msdn.microsoft.com/en-us/library/dn255006(v=vs.85).aspx) for Internet Explorer.
- [Web Console](https://developer.mozilla.org/en-US/docs/Tools/Web_Console) for Firefox.
- [Remote debugging](https://developer.chrome.com/devtools/docs/remote-debugging) for Android.
- [Web Inspector](https://developer.apple.com/library/safari/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/GettingStarted/GettingStarted.html) for iOS.


In Chrome, you can use the
[JavaScript Console](https://developers.google.com/web/tools/chrome-devtools/debug/console)
to check console output as follows.

1. To open the Developer Tools, select the menu icon \> **More Tools** \> **Developer Tools**.
2. To open the JavaScript Console, click the **Console** tab at the top of the Developer Tools window. You can also use the ESC key to toggle the JavaScript Console.