For some users, when we get their recently played tracks, all playlist context is NULL. However, for other users, it passes through the correct context. Here are examples:
Same playlist for myself:
{
track: {
album: {
album_type: 'single',
artists: [Array],
available_markets: [Array],
external_urls: [Object],
href: 'https://api.spotify.com/v1/albums/27tsAgjTJsSDwUjooElYLk',
id: '27tsAgjTJsSDwUjooElYLk',
images: [Array],
name: 'Cry',
release_date: '2022-11-04',
release_date_precision: 'day',
total_tracks: 1,
type: 'album',
uri: spotify:album:27tsAgjTJsSDwUjooElYLk'
},
artists: [ [Object] ],
disc_number: 1,
duration_ms: 207652,
explicit: false,
external_ids: { isrc: 'FXQ892200472' },
external_urls: {
spotify: 'https://open.spotify.com/track/09kI7WYLChLijcBSrSxhee'
},
href: 'https://api.spotify.com/v1/tracks/09kI7WYLChLijcBSrSxhee',
id: '09kI7WYLChLijcBSrSxhee',
name: 'Cry',
popularity: 61,
preview_url: https://p.scdn.co/mp3-preview/5379a5812b067364fc96ba92b19e5b3db672ba41?cid=4d156d4ae1774d6e9cdf264a7ba7f25d',
track_number: 1,
type: 'track',
uri: 'spotify:track:09kI7WYLChLijcBSrSxhee'
},
played_at: '2023-01-10T18:15:18.008Z',
context: null
}
As you can see at the bottom, it's null.
However, same playlist for my friend:
{
track: {
album: {
album_type: 'single',
artists: [Array],
available_markets: [Array],
external_urls: [Object],
href: 'https://api.spotify.com/v1/albums/0mPNeZzdOeFqU5KOCnOwJs',
id: '0mPNeZzdOeFqU5KOCnOwJs',
images: [Array],
name: 'Riptide',
release_date: '2021-12-24',
release_date_precision: 'day',
total_tracks: 1,
type: 'album',
uri: spotify:album:0mPNeZzdOeFqU5KOCnOwJs'
},
artists: [ [Object] ],
disc_number: 1,
duration_ms: 216000,
explicit: false,
external_ids: { isrc: 'FXQ892100128' },
external_urls: {
spotify: 'https://open.spotify.com/track/1PNQplgmCV84s4CYPf0Rr5'
},
href: 'https://api.spotify.com/v1/tracks/1PNQplgmCV84s4CYPf0Rr5',
id: '1PNQplgmCV84s4CYPf0Rr5',
name: 'Riptide',
popularity: 50,
track_number: 1,
type: 'track',
uri: 'spotify:track:1PNQplgmCV84s4CYPf0Rr5'
},
played_at: '2023-01-10T18:30:23.072Z',
context: {
external_urls: {
spotify: 'https://open.spotify.com/playlist/6IKQrtMc4c00YzONcUt7QH'
},
href: 'https://api.spotify.com/v1/playlists/6IKQrtMc4c00YzONcUt7QH',
type: 'playlist',
uri: 'spotify:playlist:6IKQrtMc4c00YzONcUt7QH'
}
}
As you can see, the playlist context is passed through at the bottom.
I was looking at Github and noticed a few devs with the same issue in 2017/2018. Anyone have similar issues or can help with a fix from Spotify?