<?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: Fetching user's top songs returns error code 500 in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Fetching-user-s-top-songs-returns-error-code-500/m-p/5513624#M8155</link>
    <description>&lt;P&gt;Thanks for your answer, that's actually what I implemented while waiting for an answer. But one other question to SpotiPy: Is it possible to "skip" the authorization flow after the first login? My goal is to run this script in the background on my server automated and having to approve the access everytime is not what I'm looking for.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Mar 2023 18:36:17 GMT</pubDate>
    <dc:creator>iamniklas5700</dc:creator>
    <dc:date>2023-03-01T18:36:17Z</dc:date>
    <item>
      <title>Fetching user's top songs returns error code 500</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Fetching-user-s-top-songs-returns-error-code-500/m-p/5513560#M8153</link>
      <description>&lt;P&gt;Hi, I'm all new to the spotify api and this might be just a misunderstanding of mine on how to use the api.&lt;/P&gt;&lt;P&gt;My goal is to sync one of my playlists to 'my top tracks this month' section in my profile which is only visible to me. For that, I've created an application in the spotify dashboard where my personal spotify account is a registered user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To sync the playlist, I've written a little python script that requests an access token (for development purposes with all scopes set) and uses that token to fetch the top 50 monthly songs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, when trying to fetch them, the api returns an error code 500. (You can find the relevant code snippet in the pastebin link below).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't quite find my error there. What am I missing out here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pastebin.com/rNs9Y0DW" target="_blank"&gt;https://pastebin.com/rNs9Y0DW&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 16:16:00 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Fetching-user-s-top-songs-returns-error-code-500/m-p/5513560#M8153</guid>
      <dc:creator>iamniklas5700</dc:creator>
      <dc:date>2023-03-01T16:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching user's top songs returns error code 500</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Fetching-user-s-top-songs-returns-error-code-500/m-p/5513598#M8154</link>
      <description>&lt;P&gt;It's not going to work, because you are trying to use &lt;A href="https://beta-developer.spotify.com/documentation/web-api/tutorials/client-credentials-flow#:~:text=Since%20this%20flow%20does%20not%20include%20authorization%2C%20only%20endpoints%20that%20do%20not%20access%20user%20information%20can%20be%20accessed." target="_blank" rel="noopener"&gt;Client Credentials&lt;/A&gt; when &lt;A href="https://beta-developer.spotify.com/documentation/web-api/tutorials/code-flow" target="_blank" rel="noopener"&gt;Authorization&lt;/A&gt; is required.&lt;/P&gt;&lt;P&gt;I recommend you to use the Python Spotify API wrapper called &lt;A href="https://github.com/spotipy-dev/spotipy" target="_blank" rel="noopener"&gt;SpotiPy&lt;/A&gt; to make everything much easier.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 17:55:45 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Fetching-user-s-top-songs-returns-error-code-500/m-p/5513598#M8154</guid>
      <dc:creator>Ximzend</dc:creator>
      <dc:date>2023-03-01T17:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching user's top songs returns error code 500</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Fetching-user-s-top-songs-returns-error-code-500/m-p/5513624#M8155</link>
      <description>&lt;P&gt;Thanks for your answer, that's actually what I implemented while waiting for an answer. But one other question to SpotiPy: Is it possible to "skip" the authorization flow after the first login? My goal is to run this script in the background on my server automated and having to approve the access everytime is not what I'm looking for.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 18:36:17 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Fetching-user-s-top-songs-returns-error-code-500/m-p/5513624#M8155</guid>
      <dc:creator>iamniklas5700</dc:creator>
      <dc:date>2023-03-01T18:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching user's top songs returns error code 500</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Fetching-user-s-top-songs-returns-error-code-500/m-p/5513634#M8156</link>
      <description>&lt;P&gt;Yes, with Spotipy, after you log in, the access token and refresh token will be stored in a .cache file, in the directory where you are running your script from. When the access token expires or run the script again, it uses those tokens automatically, and updates them if needed.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 16:21:19 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Fetching-user-s-top-songs-returns-error-code-500/m-p/5513634#M8156</guid>
      <dc:creator>Ximzend</dc:creator>
      <dc:date>2023-06-14T16:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching user's top songs returns error code 500</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Fetching-user-s-top-songs-returns-error-code-500/m-p/5513683#M8158</link>
      <description>&lt;P&gt;Awesome, it's working. Thanks for helping out!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 21:20:27 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Fetching-user-s-top-songs-returns-error-code-500/m-p/5513683#M8158</guid>
      <dc:creator>iamniklas5700</dc:creator>
      <dc:date>2023-03-01T21:20:27Z</dc:date>
    </item>
  </channel>
</rss>

