gd_authenticate {rgeedim}R Documentation

Authenticate with Google Earth Engine using gcloud, "Notebook Authenticator" or other method

Description

Calls ee.Authenticate(...) to create a local instance of persistent credentials for Google Earth Engine. These credentials are used on subsequent calls to ee.Initialize(...) via gd_initialize().

Usage

gd_authenticate(
  authorization_code = NULL,
  quiet = FALSE,
  code_verifier = NULL,
  auth_mode = NULL,
  scopes = NULL,
  force = TRUE
)

Arguments

authorization_code

Default: NULL

quiet

Suppress warnings, errors, messages? Default: FALSE

code_verifier

Code verifier (required if authorization_code is specified). Default: NULL

auth_mode

One of "notebook", "colab", "gcloud", "gcloud-legacy" or (default) NULL to guess based on the current environment.

scopes

List of scopes to use for authentication. Defaults NULL corresponds to c('https://www.googleapis.com/auth/earthengine', 'https://www.googleapis.com/auth/devstorage.full_control')

force

Force authentication even if valid credentials exist? Default: TRUE

Details

This method should be called once to set up a machine/project with a particular authentication method.

Value

This function is primarily used for the side-effect of authentication with the 'Google Earth Engine' servers. Invisibly returns try-error on error.

Examples

## Not run: 
# opens web page to complete authentication/provide authorization code
gd_authenticate(auth_mode = "notebook")

## End(Not run)

[Package rgeedim version 0.2.7 Index]