Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Huge Discrepancy Between Retry-After and Rate-Limit-Reset Headers

Huge Discrepancy Between Retry-After and Rate-Limit-Reset Headers

Hey Spotify team/community,

I'm working on a Discord bot that tracks new music releases for users from artists they follow or listen to frequently.
Been running into some weird rate limiting issues lately that I can't figure out.
My bot got rate limited for the first time today and I noticed something strange in the response headers.
The Retry-After header said 71943 seconds (that's almost 20 hours!), but the X-RateLimit-Reset header indicated the limit would reset in just 58 minutes.

This is super confusing.
Which value should I actually respect? Is there a bug in one of these headers or are they meant to represent different things?

Some context on how I'm using the API:
- I'm calling various endpoints like /me/following, /me/top/artists, and /artists/{id}/albums
- The bot checks for new releases about once per hour for artists that users follow
- I've implemented proper backoff strategies and caching
- When rate limited, I pause requests and wait for the specified time before retrying

This happened specifically when calling: /artists/1C3qb5czyoPMhiTRFM86EQ/albums?include_groups=album,single,compilation&limit=20
The status was 429 with a Retry-After of 71943 seconds, which seems excessively long compared to the reset time.

Any insights on what's happening here would be really helpful.
Thanks!

Reply
0 Replies

Suggested posts