BROKEN DOCUMENTATION: Backend Flow
URL"
https://requests-oauthlib.readthedocs.io/en/latest/oauth2_workflow.html#backend-application-flow
theauth = HTTPBasicAuth(creds.ClientID,creds.ClientSecret)
client = BackendApplicationClient(creds.ClientID)
bcauth = OAuth2Session(client)
token = bcauth.fetch_token(token_url=tokenendpoint,auth=theauth)
RESPONSE:
"Please supply either code or " "authorization_response parameters." ValueError: Please supply either code or authorization_response parameters.
NO idea what these mean or why they need to be set for just a Backend Client oAuth.
Putting in :
token = bcauth.fetch_token(token_url=tokenendpoint, client_id=creds.ClientID,client_secret=creds.ClientSecret)
Doesn't work either...
What is going with the documentation?
Encountered the same issue. Does anybody maintain this package?
Hello @bostonareahuman and future people who can not copy,
Yesterday I was quite tired and did not notice the typo.
bcauth = OAuth2Session(client) has to be bcauth = OAuth2Session(client=client).
Otherwise the constructor will initialize the Session to the default workflow, which is Web Application Flow.
No further changes are required to the code or docs neither. TIcket can be closed.