Replies: 1 comment
-
In your current implementation it doesn't look like you are using the league = League(league_id=311923117, year=2025, espn_s2=secrets["ESPN_S2"], swid=secrets["SWID"]) The package will handle authentication and pull all of your league data |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! Let me start by saying I'm a complete beginner and this is my first discussion ever. Big thanks to everyone who contributed to the API thus far!
I'm trying to access my private ESPN Fantasy Basketball league using the espn-api library but running into authentication issues. I can access the league via browser, but API requests fail.
Setup
League Type: Private H2H 9-category (2024 season)
League URL: https://fantasy.espn.com/basketball/league?leagueId=311923117
Python version: 3.11.11
espn-api version: 0.12.0
What I've Tried
Getting fresh cookies after logging in (ESPN_S2, SWID) as well as (ESPN_S2, SWID, DSID)
Using both direct API requests and the espn-api library
Testing different year parameters (2024, 2023)
Current Implementation
Current Results
Environment
Please let me know what am I doing wrong or if I should share anything else to troubleshoot.
Any help will be much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions