calpass_get_token {calpassapi} | R Documentation |
Obtain CalPASS API token
Description
Obtain a token from CalPASS using your API credentials, which should allow access for 60 minutes.
Usage
calpass_get_token(
username = Sys.getenv("cp_api_uid"),
password = Sys.getenv("cp_api_pwd"),
client_id,
scope,
auth_endpoint = "https://oauth.calpassplus.org/connect/token",
verbose = FALSE
)
Arguments
username |
API username. For security reasons, the user could specify |
password |
API password. The user could specify |
client_id |
parameter needed in the http body in order to obtain a token (unique to |
scope |
parameter needed in the http body in order to obtain a token (unique to |
auth_endpoint |
Authentication endpoint/url, defaults to |
verbose |
If |
Value
CalPASS token string
Author(s)
Vinh Nguyen
Examples
## Not run:
cp_token <- calpass_get_token(username='my_cp_api_uid', password='my_cp_api_pwd'
, client_id='my_client_id'
, scope='my_scope'
)
## End(Not run)