Announcements
The Spotify Stars Program: Celebrating Values Week!

Help Wizard

Step 1

NEXT STEP

Getting track time played

Solved!

Getting track time played

I have a Matrix LED Panel and I want to use it with the Spotify API. I know it's possible to grab the cover of the currently playing song. But is it also possible to get the "song progress" of the current song?

 

In the end I would like to hang the panel on the wall and display the information there: song, artist, possibly album and song progress.

 

I've read that if you pull the song cover, this is queried every second. That will definitely work with the song progress.

Reply

Accepted Solutions
Marked as solution

Yes, if you want to get the progress over time, you have to request every second or on a shorter time interval.

The endpoint you are looking for is Get Playback State. It requires the user-read-playback-state Authorization scope.

View solution in original post

2 Replies
Marked as solution

Yes, if you want to get the progress over time, you have to request every second or on a shorter time interval.

The endpoint you are looking for is Get Playback State. It requires the user-read-playback-state Authorization scope.

I looked around a bit and found that I can also get the information from: https://developer.spotify.com/console/get-users-currently-playing-track/.

So that I can show the progress, I also need the song length. Although this can be output ("duration_ms"), unfortunately the time does not match the actual time in Spotify. What can be the reason?

Suggested posts