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
ARDUINO_API_CLIENT_ID)- client_secret
Your client secret (default is the environmental variable
ARDUINO_API_CLIENT_SECRET)- store_token
Where your token is stored. If
optionit will be saved into the .Rprofile (not cross-session), ifenvirit will be saved as an environmental variable.- return_token
If
TRUEreturns the token value as output of the function.- silent
Whether to hide or show API method success messages (default
FALSE)- ...
Additional parameters needed for the body of the
POSTrequest:token_url(default:https://api2.arduino.cc/iot/v1/clients/token/)grant_type(default:client_credentials)audience(default:https://api2.arduino.cc/iot/)content_type(default:application/x-www-form-urlencoded)
