get_token: Get Access Token

Description Usage Arguments Details Value Examples

View source: R/get-token.R

Description

get_token gets Access Token for V2 aWhere API

Usage

1
get_token(uid, secret, use_environment = TRUE, apiAddress = "api.awhere.com")

Arguments

uid

Consumer key associated with the user's aWhere API account

secret

Consumer secret associated the user's aWhere API account

apiAddress

Address of aWhere API to use. For advanced use only. Most users will not need to use this parameter (optional)

use_enviroment

Optional logical value, determines whether API access token will be saved in a local locked environment in addition to being returned by the function. Defaults to TRUE to avoid breaking existing code.

Details

This script provides an aWhere access token for the current session of the API. Information for the key and secret in this function can be found on a user's account at developer.awhere.com, under the apps.

Value

List with three elements:#' error: logical indicating whether there was an error error_message: NULL if error is FALSE, a character error message otherwise token: aWhere API access token value

Examples

1
2
## Not run: get_token("uid", "secret")
## Not run: token_response <- get_token('uid', 'secret', use_environment = FALSE)

aWhereAPI/aWhere-R-Library documentation built on Nov. 5, 2021, 3:35 a.m.