Announcements

Help Wizard

Step 1

NEXT STEP

Web API 500 Internal Error when calling v1/me/player/play (inconsistently)

Web API 500 Internal Error when calling v1/me/player/play (inconsistently)

Premium account: This endpoint works fine 75% of the time.

 

The other 25% of the time an internal error is returned and the request fails. Are developers working to solve this issue?

 

On the repository there are similar issues regarding this. The earliest was from 2017 with no resolution: https://github.com/spotify/web-api/issues/1040

Reply
3 Replies

I want to say everything was working fine until recently. We had this issue about a month ago and resolved it by sending "offset": ["position": 0] in the body. Now the problem is back and there is no remedy from my end.

This is all the code involved, written in Swift.

let url = URL(string: "https://api.spotify.com/v1/me/player/play")!
var request = URLRequest(url: url)
request.setValue("Bearer \(token!)", forHTTPHeaderField: "Authorization")
request.httpMethod = "PUT"
request.httpBody = try? JSONSerialization.data(withJSONObject: [
    "uris": uriArray,
    "position_ms": position,
    "offset": ["position": 0]
])
request.setValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")

Hey there, help's here!

 

Thanks for reaching out on the Spotify Community. I can see from the Github issue that Spotify is looking into this. I'll give the right folks a nudge about this. I recommend keeping an eye on the issue on Github for updates (https://github.com/spotify/web-api/issues/1040). Let me know if you have any questions!

 

Take care,

Hubo

HuboSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Suggested posts