Stuck getting token from Yahoo Oauth 2.0 Fantasy Football API

48 views Asked by At

I am trying to access data for my Yahoo Football Fantasy League to do further Analysis. I am using this also to learn more about R. So far I followed all the steps in other examples but I am stuck at the token reception stage.

This is my code so far.

library(httr)
library(XML)
library(RJSONIO)
library(ggplot2)
# saved my yahoo keys to a file, now, read them in...
creds <- read.table("./yahoocreds3.txt", stringsAsFactors=F)
consumer.key <- creds[1,2]
consumer.secret <- creds[2,2]
oauth_endpoints("yahoo")
myapp <- oauth_app("yahoo", key = consumer.key, secret = consumer.secret,"https://localhost")
token <- oauth2.0_token(oauth_endpoints("yahoo"), myapp)

My Hmepage and URL Redirect on the App are https://localhost

I can open the page to grant access and I can grant it, but on Rstudio I see the following message and get stuck at it.

Waiting for authentication in browser...
Press Esc/Ctrl + C to abort

The only way out is to press ESC but it aborts the program and I get no token.

What am I doing wrong?

Thanks

I ran the Code. My expectative is to get the Oauth Token in the variable token, but It is not happening. I have tried changing the URL redirect to "oob" but the Yahoo App page does not allow it. I do not have a website per se, the idea is to run it from my desktop.

0

There are 0 answers