requests / requests-oauthlib

OAuthlib support for Python-Requests!
https://requests-oauthlib.readthedocs.org/
ISC License
1.72k stars 424 forks source link

TypeError: prepare_grant_uri() got multiple values for argument 'response_type' #440

Open t3ndai opened 3 years ago

t3ndai commented 3 years ago
client_id = "ids"
client_secret="secrets"
response_type="code"

@app.route('/auth', methods=['GET'])
def auth():
    spotify = OAuth2Session(client_id=client_id, redirect_uri=redirect_uri)
    authorization_url, state = 
    spotify.authorization_url(authorization_base_url,response_type=response_type)

    session['oauth_state'] = state 
    return redirect(authorization_url)

with response_type being a parameter required by spotify.

and based on the docs | examples seems it's an issue with requests-oauthlib

also for reference https://stackoverflow.com/questions/28250757/oauth2-requests-oauthlib-typeerror-prepare-request-uri-got-multiple-values-fo