spotify-currently-playing-track
spotify-currently-playing-track copied to clipboard
Dynamically generate Spotify currently playing tracks for your github readme or everywhere.
Spotify Currently Playing Track
Dynamically generate Spotify currently playing tracks for your github readme or everywhere.
Overview
How to use
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://spotify-currently-playing-track.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.
2. Installation
$ npm install
3. Get Authorize URL
$ npm run get-authorize-url
Paste the entire link into your browser and copy the url query string named "code".
4. Get Refresh Token
$ npm run get-refresh-token <code>
Copy and paste it into the YOUR_REFRESH_TOKEN
field.
5. Run start
$ npm run start
Deploy on your Vercel
- Sign in with GitHub by Continue with GitHub.
-
Fork this repo.
-
Import project and select Import Git Repository.
Allow access to your repository, if prompted.
- Select root and keep everything default, then add
YOUR_CLIENT_ID
,YOUR_CLIENT_SECRET
andYOUR_REFRESH_TOKEN
of Environment Variables.
- Click deploy, and see your domains to use the API! Replace overview link with your URL. enjoy! :tada:
Known Bug :bug:
Layer content inside HTML in SVG foreignObject renders in the wrong place