Constructor function for objects of class AuthState.
init_AuthState(package = NA_character_, app = NULL, api_key = NULL, auth_active = TRUE, cred = NULL)
Package name, an optional string. The associated package will
generally by implied by the namespace within which the
Optional. An OAuth consumer application, as produced by
Optional. API key (a string). Some APIs accept unauthorized, "token-free" requests for public resources, but only if the request includes an API key.
Credentials. Typically populated indirectly via
An object of class AuthState.
my_app <- httr::oauth_app( appname = "my_package", key = "keykeykeykeykeykey", secret = "secretsecretsecret" ) init_AuthState( package = "my_package", app = my_app, api_key = "api_key_api_key_api_key", )#> <AuthState (via gargle)> #> <package> my_package #> <app> my_package #> <api_key> api_key... #> <auth_active> TRUE #> <credentials> NULL #> ---