activityInfoToken: Store personal token to authorize requests for the...

View source: R/auth.R

activityInfoTokenR Documentation

Store personal token to authorize requests for the ActivityInfo API

Description

Configures the current session to use a personal token for authentication to the ActivityInfo Server.

Usage

activityInfoToken(token, prompt = TRUE)

Arguments

token

The personal token used to authenticate with to ActivityInfo.org

prompt

TRUE if to prompt the user to save the token

Details

Users can generate a personal API token from the Profile Settings page of ActivityInfo's user interface. This token is used instead of a password when connecting to the ActivityInfo API.

Note, in general, you never include your API token in an R source file or check such sources with tokens into version control.

When run interactively and prompt = TRUE, you will be prompted to store the token locally on your device. This avoids the need to provide the token each time you run a script. The token is stored in plaintext, however, so you should only agree to store your token when your device is properly secured with a screenlock and not shared with others.

Examples

## Not run: 
activityInfoToken("<API TOKEN>")

## End(Not run)

bedatadriven/activityinfo-R documentation built on Dec. 21, 2024, 8:23 a.m.