I cloned and installed Paul Lamere's Python wrapper for the Spotify Web API via python setup.py install
but I can't seem to run some of the examples correctly.
Specifically, when I try to run user_playlists_contents.py
or user_starred_playlist.py
, a browser is launched and I'm directed to the Spotify login page. After logging in, I get a Spotify error within the browser that only says: "Oops! Something went wrong." The script asks for the URL I was redirected to, but entering in both the URL of the login page and the URL of the error page (obviously) trigger an error within the Terminal: spotipy.oauth2.SpotifyOauthError: Bad Request
At first I was using a Facebook-connected Spotify account and logging in to Spotify through Facebook when prompted, so I thought that might be an issue. However even after creating a new email-only Spotify account and running the scripts on this new email-only username I got the same results.
I also tried registering a new App in my Spotify developer account and using its CLIENT_ID
, CLIENT_SECRET
, and REDIRECT_URI
in the examples/util.py
but this didn't seem to do anything. It seems unlikely anyways that modifying examples/util.py
is necessary.
Thinking this might be a browser issue I also reset my browser (Chrome) and after that didn't work I tried switching Safari to the default browser but that also did nothing.
Both these scripts depend on prompt_for_user_token()
which is defined in examples/util.py
, and seems to be where things are going wrong.
What am I doing wrong? Have I missed something painfully obvious? Thanks in advance.