youtube_oauth {YTAnalytics}R Documentation

YouTube API OAuth

Description

This creates or grabs a token to authorize API requests

Usage

youtube_oauth(
  clientId = NULL,
  clientSecret = NULL,
  tokenFile = ".httr-oauth",
  useOOB = FALSE,
  setEnvVar = FALSE
)

Arguments

clientId

Required. Client Id obtained from console.cloud.google.com.

clientSecret

Required. Client Secret obtained from console.cloud.google.com

tokenFile

The name of the token httr-oauth file to read the token from. If the file does not exist then one will be created with the provided name.

useOOB

If TRUE, use oob method to copy/paste token into R.

setEnvVar

If TRUE, create an environment variable called "YouTube_Token" to store token.

Value

token environment

Examples

## Not run: 
youtube_oauth("123456789asdalksdjfhaslkdjfb.apps.googleusercontent.com",
              "MasdfH5320208ladshf790",
              token = ".httr-oauth-myToken")

## End(Not run)

[Package YTAnalytics version 0.1.0 Index]