This is a code i prepared to create a dataset for analysing the spotify recommendation system.
1 - To Generate client Id and client secret. Create an spotify developers account (https://developer.spotify.com/)
2 - Go to dashboard and create an app.
3 - Give any name to the app and fill some description.
4 - Enter http://localhost:3000 in Redirect urls.
5 - Once your app is created replace the client Id and secret in the code.