Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] OAuth Error - How to get access token for private league I don't have access to #62

Open
brownbrandon272 opened this issue Oct 11, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@brownbrandon272
Copy link

Description of Issue

Not so much a "bug" as it is an "issue" because docs state that yfpy only works for public leagues or private leagues I have access to. Technically I do have access to this private league; it's just under a different email as my app, which is what I believe is causing my "Developers: Please specify a valid client and submit again." error.

I have a Yahoo Developer app (under email [email protected]) and I have a private league (under email [email protected]). Ideally I would be able to open a browser to log in and authenticate with the email that does have access and return an access token that I can use with YahooFantasySportsQuery. Is there a way that to do with with yfpy (entirely or even partially)?

from decouple import config
from yfpy import YahooFantasySportsQuery

# Initialize YahooFantasySports API object
yahoo = YahooFantasySportsQuery(
    league_id=96231,
    game_code="nba",  # Use "nba" for NBA leagues
    yahoo_consumer_key=config("YAHOO_CONSUMER_KEY"), # Consumer Key from Yahoo Developer App
    yahoo_consumer_secret=config("YAHOO_CONSUMER_SECRET"), # Consumer Key from Yahoo Developer App
)

KeyError: 'access_token'

Additional Information as Applicable

Yahoo Fantasy Sports League ID

96231

Yahoo Fantasy Sports League Privacy

Private

Operating System/Environment

Windows

Other

Yahoo Developer My App: Confidential Client, Read/Write

@brownbrandon272 brownbrandon272 added the bug Something isn't working label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants