check_token <- function() {
if (is.null(getOption('rArcREST.token'))) {
return(FALSE)
} else if (esri_datetime(getOption('rArcREST.expires')) < Sys.time()) {
return(FALSE)
} else {
return(TRUE)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.