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

Issue with API Usage for Managing a Large Spotify Account

Issue with API Usage for Managing a Large Spotify Account

Plan:
Premium

Device:
PC

Operating System:
Windows 10

My Question or Issue:
I’m encountering an issue with the Spotify API while managing my account, where I follow over 2,400 artists. My project involves running a weekly script to check all these artists for new releases over the past week. This script has been functioning well for the past six months, but recently, I’ve encountered a recurring problem.

After fetching data for a few hundred artists—sometimes 200, 300, or even 600—the script suddenly stops and returns a 403 error. This issue is particularly puzzling because the script can still make some requests, but it stops prematurely, preventing me from completing my task.

Steps I’ve Taken:

  1. Spacing out requests by adding delays to avoid rate limiting.
  2. Implementing retry logic to handle 403 errors, including waiting longer between retries.
  3. Ensuring requests are always authenticated with a valid token.
  4. Switching API keys from other applications in my dashboard.
  5. Changing network environment by switching to a different network.

Despite these efforts, the issue persists. I’m seeking guidance on how to resolve this problem and avoid similar issues in the future.

Reply
6 Replies

Hi!

We had the same issue for a couple of days only and also for a smaller "follow" list. There seems to be a global outage on this endpoint 😕

Wait and see for a fix...

I'm seeing this, too. Maybe it's a rate-limit issue being mis-returned as 403 instead of 429? If I treat it like a 429 and do a retry with exponential backoff (try^2 seconds), I can get through my entire list of 5554 followed artists. Doing this just now I got 31 403s along the way, but in only one case did it take more than 1 retry to get a given page successfully.

Oh wow, glad to know I'm not alone here. I've been using the Spotify API for over 5 years now, usually 429s are returned as 429s. Here's the thread I posted at the developer forums:

 

https://community.spotify.com/t5/Spotify-for-Developers/v1-me-following-getting-403s-all-of-a-sudden...

I doubt it's the case. I've never gotten a 429 on this endpoint specifically, and for all of its pitfalls - the Spotify API usually *does* tell when you're doing too many requests with a proper status code.

Except for this other recent issue where it does give 429s, but doesn't include the Retry-After header:

https://community.spotify.com/t5/Spotify-for-Developers/Error-429-retry-after-missing/m-p/6234182#M1...

 

Might be unrelated. But both things just started happening, so...

I have same issue. I follow close to 1000 artists and my app, which was able to get all the followed artists a week ago with pagination, now receives 403 errors. When I turned off pagination and just request 50 followed artists, the app works fine. I initially thought it could be related to rate limit but error is 403 not 429. Appreciate any insight on this issue.

Suggested posts

Type a product name