wf_set_key {ecmwfr}R Documentation

Set secret ECMWF token

Description

Saves the token to your local keychain under a service called "ecmwfr".

Usage

wf_set_key(user, key, service)

Arguments

user

user (email address) used to sign up for the ECMWF data service

key

token provided by ECMWF

service

which service to use, one of webapi, cds or ads

Details

In systems without keychain management set the option keyring_backend to 'file' (i.e. options(keyring_backend = "file")) in order to write the keychain entry to an encrypted file. This mostly pertains to headless Linux systems. The keychain files can be found in ~/.config/r-keyring.

Value

It invisibly returns the user.

Author(s)

Koen Hufkens

See Also

wf_get_key

Examples


## Not run: 
# set key
wf_set_key(user = "test@mail.com", key = "123")

# get key
wf_get_key(user = "test@mail.com")

# leave user and key empty to open a browser window to the service's website
# and type the key interactively
wf_get_key()


## End(Not run)

[Package ecmwfr version 1.5.0 Index]