Learn R Programming

vosonSML (version 0.32.7)

Authenticate.youtube: YouTube API authentication

Description

YouTube authentication uses OAuth2 and requires a Google Developer API key as described here: https://developers.google.com/youtube/v3/docs/.

Usage

# S3 method for youtube
Authenticate(socialmedia, apiKey, ...)

Value

A credential object containing an api key $auth and social media type descriptor $socialmedia set to "youtube". Object has the class names "credential" and "youtube".

Arguments

socialmedia

Character string. Identifier for social media API to authenticate, set to "youtube".

apiKey

Character string. Google developer API key to authenticate.

...

Additional parameters passed to function. Not used in this method.

Examples

Run this code
if (FALSE) {
# youtube authentication with google developer api key
myAPIKey <- "xxxxxxxxxxxx"

youtubeAuth <- Authenticate("youtube", apiKey = myAPIKey)
}

Run the code above in your browser using DataLab