create_auth_token {Rduinoiot} | R Documentation |
Create Auth Token for Arduino IoT Cloud API
Description
Obtain an authorization token using your personal client_id and client_secret.
Official documentation: API Summary
Usage
create_auth_token(
client_id = Sys.getenv("ARDUINO_API_CLIENT_ID"),
client_secret = Sys.getenv("ARDUINO_API_CLIENT_SECRET"),
store_token = "option",
return_token = FALSE,
silent = FALSE,
...
)
Arguments
client_id |
Your client id (default is the environmental variable |
client_secret |
Your client secret (default is the environmental variable |
store_token |
Where your token is stored. If |
return_token |
If |
silent |
Whether to hide or show API method success messages (default |
... |
Additional parameters needed for the body of the
|
Value
A token valid for Arduino IoT Cloud API. It can retrievable by getOption('ARDUINO_API_TOKEN')
(if store_content
= "option")
or by Sys.getenv("ARDUINO_API_TOKEN")
(if store_token
= "envir")
Examples
## Not run:
# Sys.setenv(ARDUINO_API_CLIENT_ID = 'INSERT CLIENT_ID HERE')
# Sys.setenv(ARDUINO_API_CLIENT_SECRET = 'INSERT CLIENT_SECRET HERE')
create_auth_token()
## End(Not run)