Learn R Programming

CopernicusClimate (version 0.0.4)

cds_check_authentication: Check if authentication works with a specific token

Description

Checks if the specified API key can be used for authentication at the Climate Data Service.

Usage

cds_check_authentication(token = cds_get_token(), ...)

cds_token_works(token = cds_get_token(), ...)

Value

cds_check_authentication() will return some account information when successful but throws an error if it is not. In contrast cds_token_works() returns a logical

value and will not throw an error upon failure.

Arguments

token

An API key to be used for authentication. Will use cds_get_token() by default.

...

Ignored

Examples

Run this code
if (interactive() && cds_token_works()) {
  cds_check_authentication()
}

Run the code above in your browser using DataLab