Stay organized with collections
Save and categorize content based on your preferences.
Obtaining an API Key
You will need to create a Cloud Project for every app that you launch, and
configure an API Key on the project.
The API Key is used to identify the project to Earth Engine, so that traffic
from your app can be monitored.
If Earth Engine servers become overloaded, traffic will be restricted on a
per-project basis.
There are four steps to follow:
Click Create API Key.
Enter a new project name based on the name of your app, such as
"EE App SampleApp", and hit NEXT.
Click content_copy to copy the
new key, and paste it into the Publish App dialog in the Code Editor.
(Recommended) Click the API Console link under the new key to set
referrer restrictions. See below for more details.
Referrer restrictions ensure that only the designated app(s) can use your
key.
If an app has a key with restrictions that do not match the app URL, you
will see the error "Failed to initialize with EE API".
You can set or edit referrer restrictions at any time by visiting the
Credentials page on the Cloud Console:
Make sure the correct project name is selected in the dropdown at the
top of the screen.
Click the API key name to view details for the key.
Select HTTP referrers (websites),
and paste in the full URL that appears in the Publish App/App Details
dialog: https://{you}.users.earthengine.app/view/{app name}.
Hit Save. The "Saving..." indicator should appear.
You may also replace {app name} in the URL with *,
to allow the key to be used by multiple apps, but this is not recommended.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2021-05-26 UTC."],[[["Each application requires a dedicated Cloud Project with a unique API Key for identification and traffic management within Earth Engine."],["API Keys are generated within the Cloud Project and then integrated into the application's code during the publishing process."],["Referrer restrictions should be implemented to limit API Key usage to designated applications, enhancing security and preventing unauthorized access."],["Referrer restrictions can be configured in the Cloud Console's Credentials page by specifying the application's URL, ensuring alignment between the key and its intended usage."]]],["To use Earth Engine, create a Cloud Project and an API Key for each app. Copy the key and paste it into the Code Editor's Publish App dialog. For security, set referrer restrictions in the Cloud Console by adding the app's URL (e.g., `https://{you}.users.earthengine.app/view/{app name}`) to the key's settings, ensuring only that app can use it. While replacing the app name with an asterisk allows multiple apps to use the key, it's not advised.\n"]]