box_auth: Authenticate to Box (interactive-app)

Description Usage Arguments Value Side-effects See Also

View source: R/boxr_auth.R

Description

There are two common use-cases for box_auth():

  1. Connecting to box.com accounts from boxr for the first time.

  2. Connecting to previously-connected box.com accounts.

In the first case, you will need to provide box_auth() with client_id and client_secret.

In the second case, you can call box_auth() with no arguments; the function will look for these in your R environment.

To run this function the first time, you will need access to the client_id and client_secret of a Box interactive-app. If you are using a work account, this information might be provided to you by your Box-admin team. If you are using a personal account, you will have to set up a Box interactive-app.

For both cases, these procedures are detailed in this boxr interactive-app article.

Usage

1
2
3
4
5
6
7
8
box_auth(
  client_id = NULL,
  client_secret = NULL,
  interactive = TRUE,
  cache = "~/.boxr-oauth",
  write.Renv,
  ...
)

Arguments

client_id

character, the client id for the account to use.

client_secret

character, the client secret for the account to use.

interactive

logical, indicates that the authorization process will be interactive (requiring user input to the R console, and/or a visit to box.com).

cache

A logical value or a string. TRUE means to cache using the default cache file .httr-oauth, FALSE means don't cache, and NA means to guess using some sensible heuristics. A string means use the specified path as the cache file.

write.Renv

deprecated.

...

Other arguments passed to httr::oauth2.0_token().

Value

Invisible NULL, called for side effects.

Side-effects

This function has some side effects which make subsequent calls to box_auth() easier:

See Also

box_auth_service()

for authenticating to service-apps.

httr::oauth2.0_token()

for details on how tokens are handled.

Box Developers: Setup with OAuth 2.0

documentation for setting up Box (interactive) apps with OAuth 2.0.


boxr documentation built on Jan. 19, 2021, 5:06 p.m.