<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Spotify API /recommendations Endpoint Always Returns 404 — Even With Valid Token and Known Genre in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Spotify-API-recommendations-Endpoint-Always-Returns-404-Even/m-p/6918309#M17559</link>
    <description>&lt;P&gt;Hello fellow dev,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api" target="_blank"&gt;https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Apr 2025 00:50:20 GMT</pubDate>
    <dc:creator>musicD4RKH3LM3T</dc:creator>
    <dc:date>2025-04-14T00:50:20Z</dc:date>
    <item>
      <title>Spotify API /recommendations Endpoint Always Returns 404 — Even With Valid Token and Known Genres</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Spotify-API-recommendations-Endpoint-Always-Returns-404-Even/m-p/6917868#M17558</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Hi everyone!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;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 &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;/recommendations&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt; endpoint. This involves analyzing the user’s input, mapping it to audio features (valence, energy), and then retrieving &lt;/SPAN&gt;&lt;SPAN class=""&gt;appropriate tracks&lt;/SPAN&gt;&lt;SPAN class=""&gt; through the Spotify Web API.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;Problem I’m Facing&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;No matter what I try, the &lt;/SPAN&gt;&lt;SPAN&gt;/v1/recommendations&lt;/SPAN&gt;&lt;SPAN&gt; endpoint consistently returns a&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;404 Not Found&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Here’s&lt;/SPAN&gt;&lt;SPAN class=""&gt; what &lt;/SPAN&gt;&lt;SPAN class=""&gt;I’ve&lt;/SPAN&gt;&lt;SPAN class=""&gt; done so far:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;What I’ve Tried (Details):&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Created a brand new Spotify account (free tier)&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Registered a new app in the Developer Dashboard&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Successfully generated an &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;access token&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt; using the &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;Client Credentials Flow&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Used a well-formed GET request like:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;htpps://api.spotify.com/v1/recommendationsseed_genres=pop,rock,edm&amp;amp;limit= 5&amp;amp;market=US&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Included the token in a Postman request under the &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Bearer Token&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt; auth tab&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Response:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;404 Not Found&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;No error message body. Just a blank JSON &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;{}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;Additional Info:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Genres like &lt;/SPAN&gt;&lt;SPAN&gt;pop&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;rock&lt;/SPAN&gt;&lt;SPAN&gt;, and &lt;/SPAN&gt;&lt;SPAN&gt;edm&lt;/SPAN&gt;&lt;SPAN&gt; are &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;confirmed valid&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt; via &lt;/SPAN&gt;&lt;SPAN&gt;/available-genre-seeds&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Token is accepted — it’s not a 401 or 403&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;I’ve even tested this with multiple brand-new Spotify accounts and apps&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;The same issue happens when testing from Postman, Python (Spotipy), and even directly in browser Dev Tools&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;What I Suspect&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Based on my research, it seems that &lt;/SPAN&gt;&lt;SPAN&gt;/recommendations&lt;/SPAN&gt;&lt;SPAN&gt; might &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;not work with tokens generated via the Client Credentials Flow&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt; — and instead requires a &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;user access token&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt; obtained via the Authorization Code Flow (which is not clearly stated in the main docs).&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If that’s the case:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Why is it returning &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;404&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt; instead of a more helpful 403 or 401?&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Can Spotify confirm whether &lt;/SPAN&gt;&lt;SPAN&gt;/recommendations&lt;/SPAN&gt;&lt;SPAN&gt; is restricted from client-credentials-based tokens?&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Is there a &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;recommended way to use &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;SPAN&gt;/recommendations&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt; without involving full OAuth login for a lightweight mood-based app?&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I'd&lt;/SPAN&gt;&lt;SPAN class=""&gt; really appreciate clarification from the Spotify team or &lt;/SPAN&gt;&lt;SPAN class=""&gt;devs&lt;/SPAN&gt;&lt;SPAN class=""&gt; who have worked with this endpoint before. Is this expected behavior? Is there something subtle &lt;/SPAN&gt;&lt;SPAN class=""&gt;I’m&lt;/SPAN&gt;&lt;SPAN class=""&gt; missing in the request setup or scopes? Thanks so much in advance!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Apr 2025 19:10:50 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Spotify-API-recommendations-Endpoint-Always-Returns-404-Even/m-p/6917868#M17558</guid>
      <dc:creator>eyomartin</dc:creator>
      <dc:date>2025-04-13T19:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: Spotify API /recommendations Endpoint Always Returns 404 — Even With Valid Token and Known Genre</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Spotify-API-recommendations-Endpoint-Always-Returns-404-Even/m-p/6918309#M17559</link>
      <description>&lt;P&gt;Hello fellow dev,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api" target="_blank"&gt;https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Apr 2025 00:50:20 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Spotify-API-recommendations-Endpoint-Always-Returns-404-Even/m-p/6918309#M17559</guid>
      <dc:creator>musicD4RKH3LM3T</dc:creator>
      <dc:date>2025-04-14T00:50:20Z</dc:date>
    </item>
  </channel>
</rss>

