Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3720

How to specify user_params within httr::oauth2.0_token to obtain refresh token?

$
0
0

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_idsecret <- client_secretmyapp <- 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

Viewing all articles
Browse latest Browse all 3720

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>