regisb/spotify-onthego

Illegal redirect_uri during user auth

Dan-Wood opened this issue · 2 comments

When setting up app on a new system you need to authorise your account, the generated link from Spotify-onthego has no Redirect URI - this causes an error in the browser "Illegal redirect_uri"

https://accounts.spotify.com/authorize?client_id=**REMOVED**&response_type=code&redirect_uri=None&scope=playlist-read-private+user-library-read

Replacing the redirect_url parameter with http://localhost:888/callback works, however the link created isn't accepted by Spotify-onthego

Traceback (most recent call last): File "/usr/local/bin/spotify-playlist", line 11, in <module> sys.exit(download_playlist()) File "/usr/local/lib/python3.6/site-packages/onthego/cli.py", line 28, in download_playlist spotify_client = onthego.spotify.Client() File "/usr/local/lib/python3.6/site-packages/onthego/spotify.py", line 12, in __init__ self.spotify = spotipy.Spotify(auth=token_dispenser.spotify_token) File "/usr/local/lib/python3.6/site-packages/onthego/auth.py", line 30, in spotify_token token = self.get_new_token() File "/usr/local/lib/python3.6/site-packages/onthego/auth.py", line 47, in get_new_token scope="playlist-read-private user-library-read" File "/usr/local/lib/python3.6/site-packages/spotipy/util.py", line 86, in prompt_for_user_token token_info = sp_oauth.get_access_token(code) File "/usr/local/lib/python3.6/site-packages/spotipy/oauth2.py", line 210, in get_access_token raise SpotifyOauthError(response.reason) spotipy.oauth2.SpotifyOauthError: Bad Request

Forgot to list version (latest)

Requirement already up-to-date: spotify-onthego in /usr/local/lib/python3.6/site-packages (1.0.6)

You are absolutely right @Dan-Wood, my changes from 2 days ago broke the app. 1.0.6 is broken, but 1.0.7 was just released. Thanks for notifying me quickly of this.