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

Spotify API /recommendations Endpoint Always Returns 404 — Even With Valid Token and Known Genres

Solved!

Spotify API /recommendations Endpoint Always Returns 404 — Even With Valid Token and Known Genres

Hi everyone! 


I’m currently building a music recommendation system for a final year university project. The goal is to suggest 5 songs based on a user's current emotion (e.g., "happy", "sad", "angry"), using Spotify’s /recommendations endpoint. This involves analyzing the user’s input, mapping it to audio features (valence, energy), and then retrieving appropriate tracks through the Spotify Web API. 

 

Problem I’m Facing 

No matter what I try, the /v1/recommendations endpoint consistently returns a

404 Not Found. 

Here’s what I’ve done so far: 

 

What I’ve Tried (Details): 

  • Created a brand new Spotify account (free tier) 
  • Registered a new app in the Developer Dashboard 
  • Successfully generated an access token using the Client Credentials Flow 
  • Used a well-formed GET request like: htpps://api.spotify.com/v1/recommendationsseed_genres=pop,rock,edm&limit= 5&market=US 
  • Included the token in a Postman request under the Bearer Token auth tab 

Response: 
404 Not Found 
No error message body. Just a blank JSON {} 

 

Additional Info: 

  • Genres like pop, rock, and edm are confirmed valid via /available-genre-seeds 
  • Token is accepted — it’s not a 401 or 403 
  • I’ve even tested this with multiple brand-new Spotify accounts and apps 
  • The same issue happens when testing from Postman, Python (Spotipy), and even directly in browser Dev Tools 

What I Suspect 

Based on my research, it seems that /recommendations might not work with tokens generated via the Client Credentials Flow — and instead requires a user access token obtained via the Authorization Code Flow (which is not clearly stated in the main docs). 

 

If that’s the case: 

  • Why is it returning 404 instead of a more helpful 403 or 401? 
  • Can Spotify confirm whether /recommendations is restricted from client-credentials-based tokens? 
  • Is there a recommended way to use /recommendations without involving full OAuth login for a lightweight mood-based app? 

I'd really appreciate clarification from the Spotify team or devs who have worked with this endpoint before. Is this expected behavior? Is there something subtle I’m missing in the request setup or scopes? Thanks so much in advance! 

 

Reply

Accepted Solutions
Marked as solution

Hello fellow dev,

 

Spotify deprecated these endpoints back in November 2024. I was on the track to develop a similar application to yours and was stopped in my tracks. Recommendations as well as track analysis (valence, energy) are no longer available to use.

https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api

View solution in original post

1 Reply
Marked as solution

Hello fellow dev,

 

Spotify deprecated these endpoints back in November 2024. I was on the track to develop a similar application to yours and was stopped in my tracks. Recommendations as well as track analysis (valence, energy) are no longer available to use.

https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api

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