get_token is a function that retrieves a token string from the API that is required as part of submitting a correct tidy_depot_api request in the token parameter.

get_token(email_address = get_secret_email(), secret = get_secret())

Arguments

email_address

email address associated with secret

secret

secret used for generating API token

Value

The token string used for Authentication header in API calls

Details

get_token should work as a function call without having to pass any user parameters provided the user has correctly run store_secret_credentials to save these credentials locally in an .Renviron file. get_token will then use that information to request a token string from the API and return this string. The string can then be used for the tidy_depot_api function int he token parameter to request data and validate the user's credentials.

Author

Gabriel Rosenfeld, gabriel.rosenfeld@nih.gov