Get current active token

get_current_token(only_access_token = F)

Arguments

only_access_token

logical. Default to FALSE

Value

If TRUE, just the token string is returned not the whole token object. If no token is available, for the current session, it returns NULL

Examples

get_current_token() # Returns NULL or token object credentials
#> No .httr-oauth file exists in current working directory. #> by default one will be created at first authentification #> Use explicit authentification with cache = F to override this
#> No token available. Get a valid token for current session with datarte_auth function.
#> NULL
get_current_token(TRUE) # Returns NULL or access token string only.
#> No .httr-oauth file exists in current working directory. #> by default one will be created at first authentification #> Use explicit authentification with cache = F to override this
#> No token available. Get a valid token for current session with datarte_auth function.
#> NULL