Discord User Card is a node js application that allows you to display the current song you are listening on spotify in live.
NOTE : This application need to have a spotify premium account. Sorry for the users who don't have a premium account, i love you but i can't do anything for you...
- Clone the repository :
git clone https://github.com/Sybrax/Discord_User_Card_Spotify_App
- Install the dependencies :
npm install
- Create spotify application : here
- In the spotify application, add
http://localhost:80/callback
or your domain in the redirect uri - Copy the client id and the client secret and paste it in the
.env
file. You have to put the same redirect uri in the.env
file - You have to get your code, do a request to
https://accounts.spotify.com/authorize?client_id=<client_id>&response_type=code&redirect_uri=<redirect_uri>&scope=user-read-private%20user-read-currently-playing
and copy the code in the url. - You have to get your refresh token now. Type
npm run get-refresh-token <code>
in the terminal and copy the refresh token in the.env
file - That's it, you can now start the application with
npm start
ornpm run dev
if you want to use nodemon.
NOTE : If when you start the application you have an error like
Error: listen EADDRINUSE: address already in use :::80
, it means that the port 80 is already used by another application. You can change the port in the.env
file. Morevever if you have an error with the refresh token, you have to get a new code and a new refresh token, this is because you don't start the application for a long time. (this situation never happened to me and normally never will happen if your application is online 24/7).
Demo : here (demo of the style of the card, not the spotify dynamic card)
Download : here
Join creators-area to see more of the community : here