NodeJS sample application for Yahoo OAuth 2.0 + yfsapi-without-auth. Sandbox is here, https://yfsapi-oauth2-test-sandbox.herokuapp.com.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
public/css
views
.gitignore
LICENSE
Procfile
README.md
package.json
server.js

README.md

NodeJS sample app for Yahoo OAuth 2.0 + yfsapi-without-auth

This is a NodeJS sample application which uses Yahoo OAuth 2.0 and yfsapi-without-auth, to access Yahoo Fantasy Sports API easily. I've created a customized version of sahat/yahoo-oauth2-tutorial. To keep it simple, I tested yfsapi's user.games API only. You can experience it on my sandbox site. If you would like to test it locally, please follow next steps.

This application was tested on Ubuntu 15.10.

Prerequisites

Go to https://developer.apps.yahoo.com and create new Yahoo app.

  • Application Name : anyone you want
  • Application Type : Web Application
  • Callback Domain : myapp.com
  • API Permissions : Fantasy Sports [Read/Write]

Record your application's Client ID(Consumer Key) and Client Secret(Consumer Secret) given by Yahoo.

Setup

1. Install node.js dependencies
$ npm install
2. Edit /ets/hosts
$ sudo vi /ets/hosts
Add `127.0.0.1 myapp.com`.
3. Create new file, conf.js
module.exports = {
  'APP_CLIENT_ID': 'YOUR_CLIENT_ID_HERE',
  'APP_CLIENT_SECRET': 'YOUR_CLIENT_SECRET_HERE'
}

Test

1. Run the application
$ sudo node server.js
2. Open http://myapp.com in your browser
3. Log-in Yahoo by clicking right-top Sign in with Yahoo button.

License

This module is available under the MIT License.