Spotipy API Rate Limiting without error response?

64 Views Asked by At

The Spotify API appears (?) to be rate limiting me, but without any error response

I'm using the Spotify API & spotipy in a web app, and making a lot of requests, namely using the spotipy .track() function;

for track_id in playlist: track_info = sp.track(track_id)

Debugging is showing me its hitting up to this function, and then getting stuck on this API call forever. I figured I hit a rate limit, but I'm used to getting 429 responses when I hit it - this time, my code's just running forever with no response.

I've tested the track() call in isolation with a valid track id, and same result.

Relatively new to this API/library and not sure about how rate limiting works or if that's even what's going on here.

EDIT: worth mentioning I can still hit other API endpoints, it is JUST this one that’s giving issue.

1

There are 1 best solutions below

0
Alex On

Created a new app on the Spotify Developer Dashboard and got a new client id - my calls are now working. Still not sure what went wrong though, and this workaround obviously wouldn’t be practical for any app in production or with a lot of test users.