
Store a token in an environment variable for a specific dataset
Source:R/BigDataPE.R
bdpe_store_token.RdThis function stores an authentication token for a specific dataset in a system environment variable. The environment variable name is constructed by converting the dataset name to ASCII (removing accents), replacing spaces with underscores, and prefixing it with "BigDataPE_".
Details
If a variable with that name already exists (and is non-empty), the function
will not overwrite it unless overwrite = TRUE (e.g. to replace an expired
token).
Examples
bdpe_store_token("education_dataset", "your-token-here")
#> ✔ Token stored in environment variable: `BigDataPE_education_dataset`
# Replace an expired token
bdpe_store_token("education_dataset", "new-token", overwrite = TRUE)
#> ✔ Token stored in environment variable: `BigDataPE_education_dataset`
bdpe_remove_token("education_dataset")
#> ✔ Token removed for "education_dataset" (service "BigDataPE").