auth_code | R Documentation |
Authorize your R session to connect to an ArcGIS Portal. See details.
auth_code(client = Sys.getenv("ARCGIS_CLIENT"), host = arc_host())
auth_client(
client = Sys.getenv("ARCGIS_CLIENT"),
secret = Sys.getenv("ARCGIS_SECRET"),
host = arc_host(),
expiration = 120
)
auth_binding()
auth_user(
username = Sys.getenv("ARCGIS_USER"),
password = Sys.getenv("ARCGIS_PASSWORD"),
host = arc_host(),
expiration = 60
)
auth_key(api_key = Sys.getenv("ARCGIS_API_KEY"), host = arc_host())
refresh_token(token, client = Sys.getenv("ARCGIS_CLIENT"), host = arc_host())
validate_or_refresh_token(
token,
client = Sys.getenv("ARCGIS_CLIENT"),
host = arc_host(),
refresh_threshold = 0,
call = rlang::caller_env()
)
client |
an OAuth 2.0 developer application client ID. By default uses the
environment variable |
host |
default |
secret |
an OAuth 2.0 developer application secret. By default uses the environment
variable |
expiration |
the duration of the token in minutes. |
username |
default |
password |
default |
api_key |
default |
token |
an |
refresh_threshold |
default |
call |
The execution environment of a currently running
function, e.g. You only need to supply Can also be For more information about error calls, see Including function calls in error messages. |
ArcGIS Online and Enterprise Portals utilize OAuth2 authorization via their REST APIs.
auth_code()
is the recommend OAuth2 workflow for interactive sessions
auth_client()
is the recommended OAuth2 workflow for non-interactive sessions
auth_user()
uses legacy username and password authorization using the generateToken
endpoint. It is only recommended for legacy systems that do not implement OAuth2.
auth_binding()
fetches a token from the active portal set by arcgisbinding
. Uses arcgisbinding::arc.check_portal()
to extract the authorization token. Recommended if using arcgisbinding.
an httr2_token
## Not run:
auth_code()
auth_client()
auth_user()
auth_key()
auth_binding()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.