yt_analytics_auth | R Documentation |
Authorize 'ytAnalyticsR' to query the YouTube Analytics and Reporting APIs
yt_analytics_auth( email = gargle::gargle_oauth_email(), scopes = default_scopes, cache = gargle::gargle_oauth_cache(), use_oob = gargle::gargle_oob_default(), token = NULL )
email |
Optional. Allows user to target a specific Google identity.
Defaults to the option named "gargle_oauth_email", retrieved by
|
scopes |
A character vector of scopes to request. |
cache |
Specified the OAuth token cache. Defaults to the option named
"gargle_oauth_cache", retrieved via |
use_oob |
Whether to prefer "out of band" authentication. Defaults to
the option named "gargle_oob_default", retrieved via
|
token |
A token with class Token2.0 or an object of httr's class
|
By default you are directred to a web browser, asked to sign in to your Google account, and to grant ytAnalyticsR permission to operate on your behalf with YouTube Analytics and Reporting.
if (FALSE) { # Load/refresh existing credentials if available # otherwise go through the OAuth 2.0 flow for authorization # and authentication. yt_analytics_auth() # Force use of a token specified by the given email yt_analytics_auth(email = "user@example.com") # Force the OAuth web flow yt_analytics_auth(email = NA) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.