Learn R Programming

rgee (version 1.1.5)

ee_Authenticate: Prompts the user to authorize access to Earth Engine via OAuth2.

Description

Prompts the user to authorize access to Earth Engine via OAuth2.

Usage

ee_Authenticate(
  authorization_code = NULL,
  code_verifier = NULL,
  auth_mode = NULL,
  scopes = NULL,
  quiet = FALSE
)

Arguments

authorization_code

An optional authorization code.

code_verifier

PKCE verifier to prevent auth code stealing.

auth_mode

The authentication mode. One of:

  • 1. paste - send user to accounts.google.com to get a pastable token

  • 2. notebook - send user to notebook authenticator page

  • 3. gcloud - use gcloud to obtain credentials (will set appdefault)

  • 4. appdefault - read from existing $GOOGLE_APPLICATION_CREDENTIALS file

  • 5. None - a default mode is chosen based on your environment.

scopes

List of scopes to use for authentication. Defaults to : 'https://www.googleapis.com/auth/earthengine' or 'https://www.googleapis.com/auth/devstorage.full_control'

quiet

If TRUE, do not require interactive prompts.

Examples

Run this code
if (FALSE) {
library(rgee)

# Simple init - Load just the Earth Engine credential
ee_Authenticate()
}

Run the code above in your browser using DataLab