Skip to content

Instantly share code, notes, and snippets.

@corynissen
Created December 6, 2013 15:35
Show Gist options
  • Select an option

  • Save corynissen/7826650 to your computer and use it in GitHub Desktop.

Select an option

Save corynissen/7826650 to your computer and use it in GitHub Desktop.
yahoo fantasy football API auth
library(httr)
# saved my yahoo keys to a file, now, read them in...
creds <- read.table("~/cn/personal/keys/yahoo.txt", stringsAsFactors=F)
consumer.key <- creds[1,1]
consumer.secret <- creds[2,1]
token.url <- "https://api.login.yahoo.com/oauth/v2/"
yahoo <- oauth_endpoint("get_request_token", "request_auth", "get_token",
base_url = token.url)
myapp <- oauth_app("yahoo", key = consumer.key, secret= consumer.secret)
token <- oauth1.0_token(yahoo, myapp)
sig <- sign_oauth1.0(myapp, token$oauth_token, token$oauth_token_secret)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment