Dynamically generate Spotify currently playing tracks for your github readme or everywhere.
1. Go to Spotify Dashboard create an app.
-
Go edit settings and add Redirect URIs. i.e. White-listed addresses to redirect to after authentication success OR failure. For example development is http://localhost:3000, production is https://panntod-spotify-readme.vercel.app/api.
-
Rename
.env.example
to.env
file. Copy Redirect URIs, Client ID, Client Secret and paste intoYOUR_REDIRECT_URI
,YOUR_CLIENT_ID
andYOUR_CLIENT_SECRET
field.
npm install
npm run get-authorize-url
Paste the entire link into your browser and copy the url query string named "code".
npm run get-refresh-token <code>
Copy and paste it into the YOUR_REFRESH_TOKEN
field.
npm run start