get_access_token: get_access_token

Description Usage Arguments Details Value

View source: R/api.R

Description

Users of Enverus DirectAccess v2 must authenticate with an API key and a token generated from their client ID and client secret. The API key, client ID, and client secret may be stored as environment variables, respectively, or passed as arguments.

Usage

1
get_access_token(api_key = NULL, client_id = NULL, client_secret = NULL)

Arguments

api_key

A valid Enverus DirectAccess v2 API key as a string. Obtain one at the API site

client_id

A valid Enverus DirectAccess v2 client ID as a string.

client_secret

A valid Enverus DirectAccess v2 client secret as a string

Details

The preferred method to set the key is to set the ENVERUS_API_KEY, ENVERUS_CLIENT_ID, and ENVERUS_CLIENT_SECRET environment variables in an .Renviron file. The easiest way to do this is by calling usethis::edit_r_environ(). Don't forget to restart R after saving the variables.

Value

Returns he retrieved token invisibly and sets the ENVERUS_ACCESS_TOKEN environment variable.


steveputman/renverus documentation built on Dec. 23, 2021, 5:34 a.m.