Tucker Dooley

Software Engineer

Spotify Group Listening (Using API)

https://spotify-group-listening.herokuapp.com/


This is the second version of the Spotify Group Listening (Using Selenium) app, but using Spotify’s API instead. I’m glad I decided to remake this app using the API, because it makes this app much more applicable, and I personally use it for all of my friend group road trips.

I used bootstrap for the front end, and Node.js and SocketIO for the backend. The app starts with a group creation page. The host who’s phone will be used to play music, should be the one to click the “Create Group” button. When doing so, they will be prompted to enter their spotify credentials, and an auth token will be sent to the server. It will also generate a long unique ID that would make it difficult for people to guess the URL. The auth token is stored on the server under the group id, it is never sent to the front end, therefore I am fairly confident that users are safe.

This token is used when a user ( who is not the host ), clicks the “Play” button. Since I am using Socket IO, an event called “Play” will fire on the server side where it uses the groups ID to grab the auth token which it uses to hit the “Play” endpoint, which will play a song on the hosts device. This is the same for all the actions made available on the front end.

One thing I forgot to mention earlier is that when the host creates a room, a new playlist called “Spotify Group Listening” will show up in their library. They need to wait until they or someone else adds at least 1 song, then they should play the first song in the playlist, then they can leave the rest up to their friends in the car.

The “search” option performs a search on the backend, and sends the results back to the front end, where they are displayed for the user.

This still isn't a fully finished application. I plan to add a delete song option, and a clear playlist option. I also need to find a more reliable hosting source. I’m using Heroku’s free version right now. My app seems to crash every now and then, and I assume it's because Heroku will occasionally shut down your free applications, but I haven't taken the time to test it.

I had this idea before I found out that Spotify is implementing this feature themselves. You can make collaborative playlists, or start group listening sessions. However the advantage to my app is that you can easily send a link, and you don’t need Spotify to join a group session.

Contact