Compares artists found in spotify playlists with the artists of fusion 2023 lineup.
- Create Account at https://developer.spotify.com/documentation/web-api
- Create application with redirect url "localhost:8888/callback"
- Copy ".env.example" to ".env" and fill in
SPOTIFY_CLIENT_IDandSPOTIFY_CLIENT_SECRETfrom spotify app settings https://developer.spotify.com/dashboard//settings - Install and start
npm i
npm start
- Open browser and navigate to "localhost:8888"
- Log into Spotify and trust that the application does nothing bad with your spotify data
- Wait a while until all artists are retrieved
- With
SPOTIFY_CLIENT_IDandSPOTIFY_CLIENT_SECRETthe spotify api object is initialized - With
scopesand the spotify api object an authorization url is created - When the autorizaton url is opened the user has to log into spotify and accept the some read right for the application
- After accepted the redirect url is opened
- In the url a
codeparameter is added - With the
codeparameter theaccess_tokenand therefresh_tokencan be retrieved - Both tokens are added to the spotify api object
- If the
access_tokengets invalid after a while therefresh_tokencan be used to retrieve a newaccess_token - The shopify api object can be used to make queries to spotify
I use my "spotify api app" with my own spotify account without any problems. If I want to use my spotify app with another spotify account it is necessary to register this user with "Username" and "Email" under "https://developer.spotify.com/dashboard//users".
In the branch syncival-2.0 is a nextjs not finished nextjs implementation of syncival. The whole part which compares with your spotify liked songs, playlists, follows and albums is not included yet.
- through vercel
- NOT by connecting to git, because this worked for some reason not because I want to use it as a serverless function
- but to manual deployments through
npm run deploy:prodornpm run deploy:dev - by setting
ALLOWED_ORIGINSenvironment variables multiple domains can be allowed by the api