Closed PacifistPickle closed 1 month ago
The playlist-read-private
scope is requested by the app here, you don't need to "add" it anywhere. But when you run the script, I believe a browser window should open the first time you run it, where you need to grant the app access to that permission. Did you get a Spotify window popup and did you grant the permission?
All I can think of off the top of my head is maybe you're trying to run this on a headless server (not supported, though you should be able to find a workaround for this), or maybe you denied access to the app accidentally when the window popped up?
There should be a file .cache-{spotify_username}
which you can try deleting, this might make the authorisation process start again. Tbh I'm not too sure, as this is an implementation detail of the spotipy library we use. Also make sure the username matches what you see in the top right corner of https://developer.spotify.com/
Ah I see now. I did not get a browser window to open automatically. I'll bet this is a symptom of running in wsl
because I'm too lazy to shut down and boot my Linux partition. I was able to circumvent this issue by copying the address printed to the command line and pasting it into the browser.
I'm getting an authorization failure when trying to open the Spotify session. I followed the ReadMe on setting up an app on developer.spotify.com and changing the config.
Error:
gio: https://accounts.spotify.com/authorize?client_id=bf0154e1300a44318a4f2fa2720d02c3&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A8888%2Fcallback&scope=playlist-read-private: Operation not supported
Traceback: (the code hangs indefinitely on this error)
Config: (with
client_secret
andusername
redacted)Spotify App Settings:
I figure I must be missing something, googling the issues have just led me in vague circles. Some Spotify forums suggest I need to allow the scope of
playlist-read-private
in my app, but I am unable to find such a setting. Regardless of what I'm doing wrong, might be best to handle this scenario to alert the user to the issue instead of hanging.Thanks