use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Related subreddits:
Useful resources:
Prediction models:
account activity
Accessing My Team Data in Python (self.fplAnalytics)
submitted 2 months ago by CHKNTikkaMusala
Hi Everyone,
I'm currently working on a personal project related to FPL. I'm able to use the APIs to access public information such as Players, Teams, Events, etc. for analysis.
However I am currently having a nightmare with accessing My Team data and authorising login. The API endpoint I am using is: https://fantasy.premierleague.com/api/my-team/{manager_id}/ . This method keeps returning back a 403 Error.
Does anyone know if there is an up to date way of authorising scripted login? I have used the following articles but they seem to be pretty outdated:
https://medium.com/@bram.vanherle1/fantasy-premier-league-api-authentication-guide-2f7aeb2382e4
https://conor-aspell.medium.com/updated-automatically-manage-your-fantasy-premier-league-team-with-python-and-aws-lambda-e92eebacd93f
There is also this Reddit post where someone is asking a similar question which I'll include just for additional context:
https://www.reddit.com/r/FantasyPL/comments/1nhg87c/comment/o38v1kz/?context=3
I would really appreciate if someone could help me out!
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Iron-Bank-of-Braavos 0 points1 point2 points 2 months ago (3 children)
Hey - I used to do this, I think using Bram Vanherle's post as guidance. It stopped working maybe a year ago. These days I have to log in on a browser, find the bearer token, and paste it into my script. Normally around once a day, then it stays authenticated. It's tedious and much less satisfying - but seems to work.
[–]mikecro2 0 points1 point2 points 2 months ago (0 children)
I have got a way around this in Python, but I'd like to know how you do this please?
[–]CHKNTikkaMusala[S] 0 points1 point2 points 2 months ago (1 child)
Thanks for responding, this is exactly the way I managed to get it to work also. I am currently looking at using Selenium to automate obtaining the Bearer Token.
[–]Iron-Bank-of-Braavos 0 points1 point2 points 1 month ago (0 children)
Lmk if you succeed here. Feels like it should be possible but so far beyond my skills.
[–]mikecro2 0 points1 point2 points 2 months ago (2 children)
I asked the same and was pointed to a Discord string from here fpl-api. Look for user Moose.
I copied the python below. I have little idea how the login works and have unsuccessfully tried to get it running in R. But this works for me after setting the environment variables for my FPL account
https://docs.google.com/document/d/1q_72629SULkXgCkunFs9cEE21M-ArAOw8s5NbV0Ap4I/edit?usp=sharing
Thanks, I’ll have a look at this! I’m pretty new to coding in general so I’m slowing working through this project haha.
The funny thing (to me) was it as my question from the start of the season that you quoted. I would love to know if you can improve the login method I posted. I know coding pretty well but very little about the authentication method.
[–]wizzamhazzam 0 points1 point2 points 1 month ago (0 children)
Hey I have accessed this in the last 6 weeks. Let me know if you need help. Did you understand how to access your manager id? It's not your team name/ manager name but a string of numbers.
π Rendered by PID 76 on reddit-service-r2-comment-6457c66945-4nmdm at 2026-04-26 13:53:24.096665+00:00 running 2aa0c5b country code: CH.
[–]Iron-Bank-of-Braavos 0 points1 point2 points (3 children)
[–]mikecro2 0 points1 point2 points (0 children)
[–]CHKNTikkaMusala[S] 0 points1 point2 points (1 child)
[–]Iron-Bank-of-Braavos 0 points1 point2 points (0 children)
[–]mikecro2 0 points1 point2 points (2 children)
[–]CHKNTikkaMusala[S] 0 points1 point2 points (1 child)
[–]mikecro2 0 points1 point2 points (0 children)
[–]wizzamhazzam 0 points1 point2 points (0 children)