View source: R/youtube_oauth.R
youtube_oauth | R Documentation |
This creates or grabs a token to authorize API requests
youtube_oauth(
clientId = NULL,
clientSecret = NULL,
tokenFile = ".httr-oauth",
useOOB = FALSE,
setEnvVar = FALSE,
scopes = c("https://www.googleapis.com/auth/youtube.readonly",
"https://www.googleapis.com/auth/yt-analytics.readonly"),
reAuthOnFail = FALSE
)
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 |
setEnvVar |
If |
scopes |
Scopes that must be passed when authenticating. See https://developers.google.com/youtube/analytics/reference for more information. |
reAuthOnFail |
If |
token environment
## Not run:
youtube_oauth("123456789asdalksdjfhaslkdjfb.apps.googleusercontent.com",
"MasdfH5320208ladshf790",
token = ".httr-oauth-myToken")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.