View source: R/get_neon_api_token.R
| get_neon_api_token | R Documentation |
This function checks if a NEON API token exists in your .Renviron file so it can be called securely without being stored in your code.
get_neon_api_token(token = NULL)
token |
The API token provided to you from the NEON formatted in quotes. A key can be acquired at https://www.neonscience.org/resources/learning-hub/tutorials/api-token-setup. If an input string is specified then the function will return it as output. |
[neon_api_token()]
# Supply a token directly - what will be returned is the input.
get_neon_api_token("example_token")
# Or retrieve NEON stored in the environment
if (nzchar(Sys.getenv("NEON_TOKEN"))) {
get_neon_api_token()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.