
Starting with v3.1.0 you can also use a promise chain to query resources and subresources refresh and call the above "tokenCallbackFunction" that you've specified to persist the if you set this and the token expires (lasts an hour) then the token will automatically you can do the same for the refresh token. if you're not authenticating via the library you'll need to set the Yahoo! Request, // the request will contain the auth code from Yahoo!Ĭallback // callback function that will be called after the token has been retrieved successful, but you can also call them manually, described below note: this will automatically set the user and refresh token if the request is you also need to set up the callback route (defined as the redirect uri above) Response // response object to redirect the user to the Yahoo! login screen public resources without authenticating a user (ie/ game meta, player meta, note: from v4.0 on, public queries are now supported that is, you can query you can authenticate a user by setting a route to call the auth function RedirectUri // redirect endpoint when user authenticates (optional) TokenCallbackFunction, // callback function when user token is refreshed (optional) Y!APPLICATION_SECRET, // Yahoo! Application Secret

Y!APPLICATION_KEY, // Yahoo! Application Key you can get an application key/secret by creating a new application on Yahoo! Const YahooFantasy = require('yahoo-fantasy')
