Jump to content


Photo

Developer API Changes for 2016


  • Please log in to reply
11 replies to this topic

#1 tonyf

tonyf

    Veteran

  • Admin
  • PipPipPip
  • 797 posts
  • Gender:Male

Posted 29 February 2016 - 03:41 PM

This offseason we are planning a major upgrade to the infrastructure that supports the MyFantasyLeague.com web site. This upgrade will allow us to continue to improve our product and offer some enhancements that many of our users have been asking for. However due to this, it will require changes to any API clients.  Without this changes, all third party applications will cease to work.
 

There are two main changes.  The first is regarding hostnames and the second deals with user authorization.

 

For hostnames, in the past the API calls have been accessible via URLs such as footballXX.myfantasyleague.com, where XX is a one or two digit number.  The new hostnames will be of the form wwwXX where XX is a two-digit number.  Some non-league specific requests will also be accepted at www.myfantasyleague.com the way football.myfantasyleague.com was used before.  Requests should be directed to the proper server (if sent to the wrong one, the system will return a redirect like in the past). In general no real changes are needed here other than verifying that you don't have any hardcoded hostnames in your code or any logic that assumes 'footballXX' as a hostname.

 

The second and more significant change is that we are introducing the concept of Single Sign On for all leagues.  That means that users will be able to access all their leagues with a single user name/password combination, instead of having to enter a password on every league, which is something that many customers have been requesting for a long time.

 

This also requires an important change on how to access league and franchise info via the API. 


Basically all information that requires user verification required the API client to pass in a cookie with the session id.  The new process is similar but the specifics have changed. The new sequence of steps is this:


  • Prompt for the customer's username and password. 
  • Programmatically call:

 

http://wwwXX.myfantasyleague.com/2016/login?L=28923&USERNAME=testuser&PASSWORD=testing1&XML=1
  • passing in a valid league id (L parameter), username and password.  The HOST value is the server hosting the league. 
  • If you are prompting for this info outside a league context, you may skip the L parameter and may use any valid hostname.
  • If valid information is passed into the login program, the response will include a <status cookie_name="cookie_value"...>.
  • If invalid information is passed into the login program, it will respond with an <error... status message> response.
  • The returned cookie name/value pair should be passed back in via a standard HTTP header cookie in the format: "Cookie: MFL_USER_ID=cookie_value" in all subsequent calls to the import program that you make while that user is logged in.
  • Note that the cookie value is a Base64 string. That means it may contain the special symbols '+', '/' and/or '='. Depending on your environment, you may need to explicitly URL-escape these symbols before passing them back to us (e.g. converting '=' to '%3D').

Some export functions require the passing of league password in order to return commissioner-only information.  That's no longer necessary. This information will be returned if a user is logged in as a user with commissioner access.

 

You should also implement a logout functionality, in which case should consist of deleting the user cookie info and not passing in subsequent calls.

The timing for this is not fully set, but we are hoping to launch this during the second week of March (March 7 or so).  The launch process is quite complex and will require a 1-2 day outage.  During this time none of the API functionality will be available (as the site won't be available either).  After the upgrade is completed, the old API's won't work. We wanted to make them backward compatible, but that turned out to be too complex and not worth the effort involved.

 

After the upgrade, the documentation on the site will be updated too.

 

Any questions or comments are welcome and you may post them in this newly created forum.

 



#2 quickolas1

quickolas1

    Veteran

  • Members
  • PipPipPip
  • 953 posts
  • Gender:Male

Posted 29 February 2016 - 06:01 PM

This offseason we are planning a major upgrade to the infrastructure that supports the MyFantasyLeague.com web site. This upgrade will allow us to continue to improve our product and offer some enhancements that many of our users have been asking for.

 

Like what, pray tell?

 

Do all user-created links using %HOST% need to be switched to %STATICHOST% ?



#3 tonyf

tonyf

    Veteran

  • Admin
  • PipPipPip
  • 797 posts
  • Gender:Male

Posted 01 March 2016 - 08:24 AM

No, %HOST% will continue to work and send you to the right place.  Keep using that for the host of your league.

 

The main benefit users will see after this is the ability to manage all their leagues with a single account and not have to log in to each league individually.  Moving forward we can add functionality to the league dashboard to give you a clearer picture of your status on all your leagues.



#4 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,404 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 02 March 2016 - 07:00 PM

I'm assuming with any API changes , that any and all scripts built for the community will no longer function.


FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/


#5 DA-G-GURU

DA-G-GURU

    Veteran

  • Members
  • PipPipPip
  • 1,164 posts
  • Gender:Male
  • Location:DAGrafixDesigns.com

Posted 03 March 2016 - 11:38 AM

Tony, will the 3rd party apps (iphone-andriod),  and scripts (posted here Habman, TOS), ..........stop working as TOS mentioned possibly? 

 

That is a significant blow to the developers across the community if so.


Simply The Best in Grafix and CSS webdesign since 2005

www.dagrafixdesigns.com

---------------
Twitter @DA_Sticks

#6 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,404 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 03 March 2016 - 03:27 PM

Confirmed , none will work..... Scoreboard , Trade popup , MFL History , Box Scores , Player News Popup ....... nada , all will need redone with new API calls 

 

No mobile apps either , so hoping MFL creates their own mobile app 


FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/


#7 tonyf

tonyf

    Veteran

  • Admin
  • PipPipPip
  • 797 posts
  • Gender:Male

Posted 03 March 2016 - 05:31 PM

The apps used by the 3rd party mobile apps will require some minor changes as described in the initial post regarding logging in.  The APIs used client-side (i.e. from javascript) already will pass the proper credentials so those should work as is.

 

If there's anything specific that you are concerned about, let me know the details and I can verify. 



#8 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,404 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 03 March 2016 - 05:51 PM

The apps used by the 3rd party mobile apps will require some minor changes as described in the initial post regarding logging in.  The APIs used client-side (i.e. from javascript) already will pass the proper credentials so those should work as is.
 
If there's anything specific that you are concerned about, let me know the details and I can verify. 

 
 
Great !  So anything we've built in HPM's calling to specific json or xml won't be affected ?  Music to my ears
 
I did have 1 question on the dashboard login , will users still be allowed to own several franchises within the same league ? Using same email and password

FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/


#9 quickolas1

quickolas1

    Veteran

  • Members
  • PipPipPip
  • 953 posts
  • Gender:Male

Posted 04 March 2016 - 08:37 AM

The main benefit users will see after this is the ability to manage all their leagues with a single account and not have to log in to each league individually.  Moving forward we can add functionality to the league dashboard to give you a clearer picture of your status on all your leagues.

 

Well, browsers store passwords. So a dashboard that I'm guessing might give something like what player you search for is a free agent in any of your leagues.

 

That the sum of it?



#10 tonyf

tonyf

    Veteran

  • Admin
  • PipPipPip
  • 797 posts
  • Gender:Male

Posted 05 March 2016 - 08:53 AM

Great !  So anything we've built in HPM's calling to specific json or xml won't be affected ?  Music to my ears

 

I can't promise that, but if there are issues on our side we'll do our best to minimize the impact.


 
 

I did have 1 question on the dashboard login , will users still be
allowed to own several franchises within the same league ? Using same
email and password

 

Users can still own multiple franchises in the same league.  However, they would need to use different usernames for each. Which is no different than the current situation other than the fact that username would need to have a unique email address.



#11 DA-G-GURU

DA-G-GURU

    Veteran

  • Members
  • PipPipPip
  • 1,164 posts
  • Gender:Male
  • Location:DAGrafixDesigns.com

Posted 09 March 2016 - 11:06 AM

Kudos to MFL for adding the welcome module back, that is a direct need for all of us....as many don't use that top right log in welcome header.

 

Second, once the new URLS populate from the new log in master account, all my scripts seem to be working ok..... That is HUGE also...

 

Cheers


Simply The Best in Grafix and CSS webdesign since 2005

www.dagrafixdesigns.com

---------------
Twitter @DA_Sticks

#12 prpost

prpost

    Veteran

  • Members
  • PipPipPip
  • 294 posts
  • Gender:Male
  • Location:Milwaukee, WI

Posted 17 March 2016 - 08:37 AM

The apps used by the 3rd party mobile apps will require some minor changes as described in the initial post regarding logging in.  The APIs used client-side (i.e. from javascript) already will pass the proper credentials so those should work as is.

 

If there's anything specific that you are concerned about, let me know the details and I can verify. 

 

For MFL History, I believe everything is and will function properly. 

 

None of the feeds used by MFLHistory require logins, and we don't have any hardcoded footballXX.myfantasyleague.com logic - we've always relied on the helpful redirects. :)


Track records and view your league's history using the MFLHistory application, available at http://www.mflhistory.com




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users