Request failed with status code 404 Playing Tracks

Request failed with status code 404 Playing Tracks






My Question or Issue


I'm working on a streaming application using the Spotify Web Player API. I'm running into an issue where accounts from the UK and Japan (and possibly anywhere outside US) cannot play tracks. If these members use a VPN with the location set to US it works fine. Whenever they connect otherwise I just get a generic "Request failed with status code 404". 


I tested this myself using NordVPN and set my location to UK and also Japan and run into the issue. When I disconnect it works fine (I'm in the US). This is very difficult to troubleshoot so I wanted to know what the issue could be. 


Just to clarify I'm using this endpoint:


I double-checked that I'm properly sending a valid device-id and token along with the URI. All of this works perfectly fine from US locations but always throws a 404 error with UK and Japan (that we've tested so far). 


For reference this is the URI I was using: spotify:playlist:3qXrQKE1fjtNGEGjetR3np but I've also had the same issue with other URIs as well.






2 Replies


I resolved the issue, still not entirely sure why it was causing this specific issue with locations. Initially, I had a backend server I was using for all the Spotify endpoints. I decided to move that to the frontend and call that directly instead of through the server and it worked fine.

I'm attempting to do a similar thing, could you tell me where to start? None of the code from the Spotify for developers page seems to work so now I'm stuck,  is it out of date? 

Suggested posts

Env: prod