I'm fairly new to API topic. So far i've managed to obtain access token (but its only valid for short period) and get information how the oauth dance is carried out by httr package but could not figure out what params should i put to obtain refresh token either found info on it.
only hint i've is documentation(page24):
https://cran.r-project.org/web/packages/httr/httr.pdf
Subject of interest is yt analytics api.
key <- client_id
secret <- client_secret
myapp <- oauth_app("google", key, secret)
token <- oauth2.0_token(oauth_endpoints("google"),
myapp,
scope=c("https://www.googleapis.com/auth/youtube.readonly",
"https://www.googleapis.com/auth/yt-analytics.readonly"))
returns valid access token (1h valid time) but the correct thing i want is refresh token.
> token$can_refresh()
[1] FALSE
> token$refresh()
Error: Refresh token not available