<?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 Error trying to refresh the access token in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Error-trying-to-refresh-the-access-token/m-p/5439813#M6654</link>
    <description>&lt;P&gt;&lt;FONT color="#000000"&gt;Hi, I am currently developing a mobile application that uses Spotify integration, as you may know when authenticating with spotify we receive an access token and a refresh token, the first one expires after an hour and the second one is used to request a new token.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;From my mobile application I request the user to give me permissions to his spotify account, therefore, he enters his credentials and I receive the access token, refresh token and calculate at the time it will expire. These values are stored in my database in a secure way and are associated to the user, also they are used by my backend where I have a scheduled task that is responsible for automatically refresh the access tokens in case they are close to expire, to achieve this I must use the refresh token and the request responsible for doing so sometimes responds with these errors 500:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;- Failed to remove token&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;- ECONNRESET&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Therefore, the refresh token is revoked and my scheduled task cannot update the access token anymore.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Does anyone know why these errors occur?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Oct 2022 14:10:28 GMT</pubDate>
    <dc:creator>swaggin</dc:creator>
    <dc:date>2022-10-05T14:10:28Z</dc:date>
    <item>
      <title>Error trying to refresh the access token</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Error-trying-to-refresh-the-access-token/m-p/5439813#M6654</link>
      <description>&lt;P&gt;&lt;FONT color="#000000"&gt;Hi, I am currently developing a mobile application that uses Spotify integration, as you may know when authenticating with spotify we receive an access token and a refresh token, the first one expires after an hour and the second one is used to request a new token.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;From my mobile application I request the user to give me permissions to his spotify account, therefore, he enters his credentials and I receive the access token, refresh token and calculate at the time it will expire. These values are stored in my database in a secure way and are associated to the user, also they are used by my backend where I have a scheduled task that is responsible for automatically refresh the access tokens in case they are close to expire, to achieve this I must use the refresh token and the request responsible for doing so sometimes responds with these errors 500:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;- Failed to remove token&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;- ECONNRESET&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Therefore, the refresh token is revoked and my scheduled task cannot update the access token anymore.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Does anyone know why these errors occur?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 14:10:28 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Error-trying-to-refresh-the-access-token/m-p/5439813#M6654</guid>
      <dc:creator>swaggin</dc:creator>
      <dc:date>2022-10-05T14:10:28Z</dc:date>
    </item>
  </channel>
</rss>

