Jump to content

[oauth2] Issue with token acquiring


Stalex

Recommended Posts

Starting today got issue with oauth2:

    token = oauth.fetch_token(
            ^^^^^^^^^^^^^^^^^^
  File "C:\Users\stale\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests_oauthlib\oauth2_session.py", line 366, in fetch_token
    self._client.parse_request_body_response(r.text, scope=self.scope)
  File "C:\Users\stale\AppData\Local\Programs\Python\Python311\Lib\site-packages\oauthlib\oauth2\rfc6749\clients\base.py", line 427, in parse_request_body_response
    self.token = parse_token_response(body, scope=scope)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\stale\AppData\Local\Programs\Python\Python311\Lib\site-packages\oauthlib\oauth2\rfc6749\parameters.py", line 441, in parse_token_response
    validate_token_parameters(params)
  File "C:\Users\stale\AppData\Local\Programs\Python\Python311\Lib\site-packages\oauthlib\oauth2\rfc6749\parameters.py", line 451, in validate_token_parameters
    raise MissingTokenError(description="Missing access token parameter.")
oauthlib.oauth2.rfc6749.errors.MissingTokenError: (missing_token) Missing access token parameter.

 

My client:

client = BackendApplicationClient(client_id=self.client_id)
oauth = OAuth2Session(client=client)
token = oauth.fetch_token(
            token_url="https://backpack.tf/oauth/access_token",
            client_id=self.client_id,
            client_secret=self.client_secret,
        )

 

Did I miss something? Or something new required for fetch_token?

Or this is an issue because my premium ends tomorrow?

 

Thank you in advance!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...