Announcements

Help Wizard

Step 1

NEXT STEP

Request failed with status code 404 Playing Tracks

Request failed with status code 404 Playing Tracks

Plan

Free/Premium

Country

US

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: https://api.spotify.com/v1/me/player/play

 

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.

 

 

 

 

 

 
Reply
3 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? 

One of our users also gets a 404 when trying to play. Now, this could be due to the requested device not being available. Now, I would like to provide at least a nice error message. Unfortunately, the 404 error is not documented, so I don't know when exactly it occurs (or at least should occur). So, when exactly is the 404 response intended?

Suggested posts