Play a random album from the Spotify® library of the user. The user needs to have a currently active Spotify® Premium account and a currently active device capable of playing music.
- Install python 3 and pip
Instructions for Ubuntu 18.04
sudo apt update
sudo apt install python3
sudo apt install python3-pip
- Install the
flask
andrequests
libraries
pip install requests
pip install Flask
-
Register as a developer to
https://developer.spotify.com/dashboard/
-
Create a new application and get the client id and client secret
-
Substitute the values in
flask.sh
-
Edit the settings of the application in the dashboard and add this redirect URI
http://localhost:5000/receive-authorization
-
Run
flask.sh
-
Connect to
localhost:5000/
and follow the instructions
I am in no way affiliated to Spotify Technology SA nor do I own the Spotify® trademark.