Announcements

Help Wizard

Step 1

NEXT STEP

duration_ms suddenly returning float instead of int

Solved!

duration_ms suddenly returning float instead of int

Suddenly, the api.spotify.com/v1/tracks/{id} endpoint has started giving me track duration_ms as a float e.g.

"duration_ms": 2345.0,

The endpoint always used to return an int, which matches the documentation. Weirdly the response from the "try it" response sample still returns an int, but I think all that shows is how useless that thing is.

 

Reply
23 Replies

I tested the tracks endpoint using Postman, and everything seems to be back to normal. 

Thanks, it's looking back to normal now. I also appreciate the explanation. Considering this already happened once before (on a different endpoint, links in previous posts), can you please suggest they implement something to prevent/catch it next time?
Thanks again.

Thanks LambertSpot!

 

Iโ€™m wondering if this other issue is caused by the same thing. Seems likely. 

https://community.spotify.com/t5/Spotify-for-Developers/The-playlist-creation-endpoint-is-frequently...

This issue is fixed for me (using spotipy Python API framework).

Suggested posts

Let's introduce ourselves!

Hey there you, ย  Yeah, you!ย 😁 ย  Welcome - we're glad you joined the Spotify Community! ย  While you here, let's have a fun game and getโ€ฆ

ModeratorStaff / Moderator/ 4 years ago  in Social & Random