I cloned and installed the Paul Lamere Python shell for the Spotify Web API through python setup.py install, but I cannot run some of the examples correctly.
In particular, when I try to launch user_playlists_contents.pyor user_starred_playlist.py, the browser launches, and I head to the Spotify login page. After logging in, I get a Spotify error in the browser, which only says: "Oh, something went wrong." The script asks for the URL that I was redirected to, but enter the URL of the login page and the URL of the error page (obviously) to cause the error in the terminal:spotipy.oauth2.SpotifyOauthError: Bad Request
At first I used a Spotify account connected to Facebook and logged in to Spotify via Facebook when prompted, so I thought this might be a problem. However, even after creating a new Spotify account for email only and running scripts on this new username via email, I got the same results.
I also tried registering the new application in my Spotify developer account and using it CLIENT_ID, CLIENT_SECRETand REDIRECT_URIin examples/util.py, but that didn't seem to do anything. It seems unlikely that change is examples/util.pynecessary.
I think this may be a problem with the browser. I also reset my browser (Chrome), and after that did not work. I tried switching Safari to the default browser, but that didn't do anything either.
Both of these scenarios depend on prompt_for_user_token()which is defined in examples/util.py, and everything seems to be going wrong.
What am I doing wrong? Did I miss something painfully obvious? Thanks in advance.
source
share