Use secrets to Authorize R package to access Google classroom API
Source:R/auth.R
auth_from_secret.Rd
This is a function to authorize the R package to access the Googleclassroom API. If no client.id and client.secret is provided, the package would provide predefined values.
Arguments
- access_token
Access token can be obtained from running authorize interactively: token <-authorize(); token$credentials$access_token
- refresh_token
Refresh token can be obtained from running authorize interactively: token <-authorize(); token$credentials$refresh_token
Examples
if (FALSE) {
token <- authorize()
auth_from_secret(
token$credentials$access_token,
token$credentials$refresh_token
)
}