ns_auth_token | R Documentation |
After creating a client in Nettskjema, this function will retrieve the access token needed for the remaining processes in the package. Automatically caches the token for more efficient API usage.
ns_auth_token(
client_id = Sys.getenv("NETTSKJEMA_CLIENT_ID"),
client_secret = Sys.getenv("NETTSKJEMA_CLIENT_SECRET"),
cache = TRUE,
cache_path = NULL
)
client_id |
Character. Default assumes this is stored in .Renviron as "ns_CLIENT_ID" |
client_secret |
Character. Default assumes this is stored in .Renviron as "ns_CLIENT_SECRET" |
cache |
Logical. Should the token be cached? |
cache_path |
Character. File path to where the token should be stored. Defaults to system cache directory. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.