You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code works fine in PowerShell, but the equivalent in python is giving the error:
token = session.fetch_token(token_url=tokenURL, client_id=ClientID, client_secret=secret)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\1455765990E\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests_oauthlib\oauth2_session.py", line 251, in fetch_token
raise ValueError(
ValueError: Please supply either code or authorization_response parameters.
It makes no sense to ask for a response url (since this is a backend workflow) and the code is what the fetch_token is going to give, so I don't have one yet!
I ask because I do think it has some value, but as you can see from the above, it is hard to get a simple thing such as fetching the token. In 20 minutes, I got this to work with the vanilla python requests library:
I am attempting to use the BackendClient workflow for creating a OATH V2.0 connection. Using the requests_oauthlib package. Documentation is at: https://requests-oauthlib.readthedocs.io/en/latest/oauth2_workflow.html#backend-application-flow
The code works fine in PowerShell, but the equivalent in python is giving the error:
It makes no sense to ask for a response url (since this is a backend workflow) and the code is what the fetch_token is going to give, so I don't have one yet!
This is the PowerShell that works fine:
and this is what we think is the equivalent in Python
The text was updated successfully, but these errors were encountered: