Need help? Check out Spotify Answers for solutions to a wide range of topics.
Hello, so I have some code to play a spotify playlist on my device.
The Problem is if I copy the Spotify URI of a playlist, everything works fine. But if I copy the spotify URI of a track, I get an error saying Could not find this Context URI.
(In case anyone is wondering I am using the npm package spotify-web-api-node).
My Code to play:
Hey @kingofsquirrel3, the calvary's here!
Hmm, I've taken a look here. It looks like you're trying to set a Track URI as context.
The context URI is basically the URI of the item (playlist/album) that contains the track and makes sure there's content to play after the track has finished (and people can rewind and skip).
You can specify a context URI together with 'offset' to play a specific track from an album or playlist. Read more about this here: https://developer.spotify.com/console/put-play/.
If you don't have a context; I recommend using the album URI as context and set the 'offset' to 'track_number'.
Let me know if that clears things up.
Have a great day,Hubo