<?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: getMyTopTracks not working in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/getMyTopTracks-not-working/m-p/5566739#M8893</link>
    <description>&lt;P&gt;Can you please post code of how you get an Access Token?&lt;/P&gt;</description>
    <pubDate>Thu, 20 Apr 2023 05:26:00 GMT</pubDate>
    <dc:creator>Ximzend</dc:creator>
    <dc:date>2023-04-20T05:26:00Z</dc:date>
    <item>
      <title>getMyTopTracks not working</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/getMyTopTracks-not-working/m-p/5566732#M8892</link>
      <description>&lt;P&gt;I have been trying to get my top tracks using this in Typescript:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;async &lt;/SPAN&gt;&lt;SPAN&gt;getDefault2&lt;/SPAN&gt;(){&lt;BR /&gt;  &lt;SPAN&gt;let &lt;/SPAN&gt;&lt;SPAN&gt;tracks &lt;/SPAN&gt;= &lt;SPAN&gt;await this&lt;/SPAN&gt;.&lt;SPAN&gt;authService&lt;/SPAN&gt;.&lt;SPAN&gt;getApi&lt;/SPAN&gt;().&lt;SPAN&gt;getMyTopTracks&lt;/SPAN&gt;({&lt;BR /&gt;    &lt;SPAN&gt;time_range&lt;/SPAN&gt;: &lt;SPAN&gt;"medium_term"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;  })&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;  &lt;SPAN&gt;console&lt;/SPAN&gt;.&lt;SPAN&gt;log&lt;/SPAN&gt;(&lt;SPAN&gt;tracks&lt;/SPAN&gt;)&lt;BR /&gt;}&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;The strange part is that the only method that is actually working is getMe() and I don't know why! I always get a 403 error!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 04:42:18 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/getMyTopTracks-not-working/m-p/5566732#M8892</guid>
      <dc:creator>tatan22</dc:creator>
      <dc:date>2023-04-20T04:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: getMyTopTracks not working</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/getMyTopTracks-not-working/m-p/5566739#M8893</link>
      <description>&lt;P&gt;Can you please post code of how you get an Access Token?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 05:26:00 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/getMyTopTracks-not-working/m-p/5566739#M8893</guid>
      <dc:creator>Ximzend</dc:creator>
      <dc:date>2023-04-20T05:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: getMyTopTracks not working</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/getMyTopTracks-not-working/m-p/5567069#M8899</link>
      <description>&lt;P&gt;First the login:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;window&lt;/SPAN&gt;.&lt;SPAN&gt;location&lt;/SPAN&gt;.&lt;SPAN&gt;href &lt;/SPAN&gt;= &lt;SPAN&gt;`https://accounts.spotify.com/authorize?client_id=&lt;/SPAN&gt;${&lt;SPAN&gt;client_id&lt;/SPAN&gt;}&lt;SPAN&gt;&amp;amp;redirect_uri=&lt;/SPAN&gt;${&lt;SPAN&gt;redirect_uri&lt;/SPAN&gt;}&lt;SPAN&gt;&amp;amp;response_type=token&amp;amp;show_dialog=true`&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;Then when I get redirected, I get the token like this:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;const &lt;/SPAN&gt;&lt;SPAN&gt;token &lt;/SPAN&gt;= &lt;SPAN&gt;this&lt;/SPAN&gt;.&lt;SPAN&gt;route&lt;/SPAN&gt;.&lt;SPAN&gt;snapshot&lt;/SPAN&gt;.&lt;SPAN&gt;fragment&lt;/SPAN&gt;.split(&lt;SPAN&gt;'&amp;amp;'&lt;/SPAN&gt;)&lt;BR /&gt;    .&lt;SPAN&gt;find&lt;/SPAN&gt;(fragment =&amp;gt; fragment.&lt;SPAN&gt;includes&lt;/SPAN&gt;(&lt;SPAN&gt;'access_token'&lt;/SPAN&gt;))&lt;BR /&gt;    .&lt;SPAN&gt;split&lt;/SPAN&gt;(&lt;SPAN&gt;'='&lt;/SPAN&gt;)[&lt;SPAN&gt;1&lt;/SPAN&gt;]&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;.&lt;SPAN&gt;spotifyApi&lt;/SPAN&gt;.&lt;SPAN&gt;setAccessToken&lt;/SPAN&gt;(token)&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;I am using 'spotify-web-api-js' library.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 14:58:14 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/getMyTopTracks-not-working/m-p/5567069#M8899</guid>
      <dc:creator>tatan22</dc:creator>
      <dc:date>2023-04-20T14:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: getMyTopTracks not working</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/getMyTopTracks-not-working/m-p/5567074#M8900</link>
      <description>&lt;P&gt;You are missing the&amp;nbsp;&lt;EM&gt;user-top-read&lt;/EM&gt; &lt;A href="https://developer.spotify.com/documentation/web-api/concepts/scopes#user-top-read" target="_blank" rel="noopener"&gt;Scope&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;(I assume you have &lt;A href="https://developer.spotify.com/documentation/web-api/concepts/authorization" target="_blank" rel="noopener"&gt;Authorization&lt;/A&gt; implemented.)&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 15:16:58 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/getMyTopTracks-not-working/m-p/5567074#M8900</guid>
      <dc:creator>Ximzend</dc:creator>
      <dc:date>2023-04-20T15:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: getMyTopTracks not working</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/getMyTopTracks-not-working/m-p/5567116#M8901</link>
      <description>&lt;P&gt;Thanks, that just worked fine!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 16:29:23 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/getMyTopTracks-not-working/m-p/5567116#M8901</guid>
      <dc:creator>tatan22</dc:creator>
      <dc:date>2023-04-20T16:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: getMyTopTracks not working</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/getMyTopTracks-not-working/m-p/5636396#M10738</link>
      <description>&lt;P&gt;i already added that scope but still not working&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 20:05:35 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/getMyTopTracks-not-working/m-p/5636396#M10738</guid>
      <dc:creator>oozkanneray</dc:creator>
      <dc:date>2023-09-14T20:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: getMyTopTracks not working</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/getMyTopTracks-not-working/m-p/5636580#M10742</link>
      <description>&lt;P&gt;@oozkanneray are you using an&amp;nbsp;&lt;A href="https://developer.spotify.com/documentation/web-api/concepts/authorization" target="_blank" rel="noopener"&gt;Authorization &lt;/A&gt;&lt;SPAN&gt;method other than Client Credentials? Because with that method, it won't work.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 04:40:12 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/getMyTopTracks-not-working/m-p/5636580#M10742</guid>
      <dc:creator>Ximzend</dc:creator>
      <dc:date>2023-09-15T04:40:12Z</dc:date>
    </item>
  </channel>
</rss>

