This is a javascript app that shows how to use the Spotify API to control the playback of music (playlist or albums) on any of your devices connected to your spotify account.

To use this app you need a Spotify client ID and client secret. You get these by creating an app in the Spotify developers dashboard here https://developer.spotify.com/dashboard/applications and add https://makeratplay.github.io/SpotifyWebAPI/ in the "Redirect URIs" settings field.

This app demostrates how the use the following APIs:

  • https://accounts.spotify.com/authorize
  • https://accounts.spotify.com/api/token
  • https://api.spotify.com/v1/me/playlists
  • https://api.spotify.com/v1/me/player/devices
  • https://api.spotify.com/v1/me/player/play
  • https://api.spotify.com/v1/me/player/pause
  • https://api.spotify.com/v1/me/player/next
  • https://api.spotify.com/v1/me/player/previous
  • https://api.spotify.com/v1/me/player
  • https://api.spotify.com/v1/playlists/{{PlaylistId}}/tracks
  • https://api.spotify.com/v1/me/player/currently-playing
  • https://api.spotify.com/v1/me/player/shuffle


I used this project to learn the Spotify API in order to create this project:

Currently Playing