The function stores the credentials for accessing movebank, by default it checks if accessing movebank is possible, and fails when either the credentials are invalid or movebank cannot be reached. The force option can be used to override this. Once credentials are stored, these functions are not needed again as all call to movebank can use the credentials from the keyring.

For more details on the usage of the keyring, how passwords are handled and handling multiple accounts see vignette("movebank", package="move2")

movebank_store_credentials(
  username,
  password,
  key_name = getOption("move2_movebank_key_name"),
  force = FALSE
)

movebank_remove_credentials(key_name = getOption("move2_movebank_key_name"))

Arguments

username

A string with the movebank username

password

Either a string or missing, if missing then the password is asked for using askpass

key_name

The name of the key in the keyring. By default this is stored in getOption("move2_movebank_key_name"), this might be useful if you have multiple accounts

force

If TRUE, when accessing movebank fails the key is stored anyway.

Value

TRUE invisible if successful

See also

Other movebank-download: movebank_download_study(), movebank_handle()

Examples

if (FALSE) { # \dontrun{
movebank_store_credentials("bart")
} # }