Skip to content

Some node scripts to get your spotify access and refresh tokens.

License

Notifications You must be signed in to change notification settings

jubelcassio/GetSpotifyTokens

Repository files navigation

Usage

  1. Serve the redirect_page on localhost:8000
    cd redirect_page
    python -m http.server

  2. Open a new terminal at the project folder, execute the "authURL" script
    node authURL.js

  3. Access the URL generated by the auth.js script

  4. Click on the 'Get Code' button

  5. The code will be copied to your clipboard. If not, you can get him from the textarea

  6. Paste the code into the terminal input

  7. Execute "token.js" script
    node token.js

  8. Test the credentials by running "test.js", it should output your spotify's username
    node test.js

  9. Your credentials are now saved into the "setup.json" file

  10. You may now finish the python server (Ctrl+C) and close the terminals

Playground

The playground function has a script that demonstrate a simple implementation. It logs information about the 5 most recently played tracks from your spotify playlist. To execute it run the commands described above, followed by:
node playground/recently_songs.js

Warning

Be careful when using your credentials, try to follow security practices when using this script and DO NOT ALLOW your clientSecret, access or refresh tokens or any other sensitive information to be exposed to unkown people.

About

Some node scripts to get your spotify access and refresh tokens.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published