This is a flask server, that fetches the current song played on your Spotify account and updates your Discord status to reflect the same
You will need a Spotify application API Client ID
and Client Secret
in order to run the server locally and implement the Spotify authentication. You can make an application at Spotify developer home. Further you will need to get your Discord User Token. A guide to get your Discord token is available here.
Add the environment variables to the .env
file in the following format
DISCORD_TOKEN="YOUR_DISCORD_TOKEN_HERE"
SPOTIFY_CLIENT_ID="YOUR_CLIENT_ID_HERE"
SPOTIFY_CLIENT_SECRET="YOUR_CLIENT_SECRET_HERE"
REDIRECT_URI="http://localhost:5000/callback"
It can be used as a potential vulnerablity to access your Discord account.
pip install -r requirements.txt
python spotify_send.py
Visit http://localhost:5000/
and authenticate the application to access user's current playing song.
Thats it!