Help Wizard

Step 1


Context is null on recently played tracks requests from Spotify API

Context is null on recently played tracks requests from Spotify API

Background Info:

Spotify tracks the location/context of where songs are played within Spotify and we can access that information via the recently played api:
GET me/player/recently-played
So if you play a stream from a playlist in Spotify your context object would look like:

For albums and artists, it would look the same except it would same (album/artist) instead of areas that it says "playlist" (ATTACHED BELOW)


What's the bug is:

Certain Spotify accounts are unable to have any context on their recently played tracks. This issue is not 100% replicable since it does not happen to all Spotify accounts. This leads us to believe that Spotify is in the process of A/B testing and has released a bug for some of the users that is causing their recently played tracks to not stream/track context.


From our testing thus far, for Spotify Accounts that are **NOT** experiencing the "no context bug", we have no problem seeing song context wherever we play the stream **except** in the "Liked Songs" playlist, in which streams that are played from that would have {"context": null}.


For users that **ARE** experiencing the "no context bug" when they stream a song in Spotify from an Artist page, Album and or a Playlist they will not see a context attached to the the recently played stream and they'll see {"context": null} for every song returned from the API call.


We were able to get a Spotify account that was experiencing the bug to see context if they played the streams specifically from the web browser (EXCLUDING desktop app and the mobile app)

IT needs to say "Listening on This Web browser"



To make sure everything was consistent between the two accounts(one that works/one that doesn't), we confirmed that the two accounts have the exact same settings. And when we did this, the result remained the same.



Having the ability to see song played at context within Spotify is important for our use case of the api

This is obviously an extremely specific bug and it's super weird that it would only be happening to some Spotify accounts.
If anyone has ANY tips or suggestions on how we can further debug the issue or links to people who have previously experienced the same issue, it would be extremely appreciated.

Screen Shot 2022-03-16 at 2.32.55 PM.png
Screen Shot 2022-03-16 at 2.33.54 PM.png
3 Replies

Experiencing the same issue as you and we need context as well. Appears to be random at the user and/or device level. Any solutions?

I have the same issue.

It got solved for my account!

Yesterday, I contacted Spotify Support with my problem, and it appeared that my account was corrupted. After the support employee fixed that, I deleted the Spotify data from my phone and desktop. Then I logged back in and tested it again. I still got "context": null, but today I tested it again, and now it is does show context!

Suggested posts