toastify icon indicating copy to clipboard operation
toastify copied to clipboard

[Bug/Help] Spotify WebAPI token expires

Open ahmedmahmud opened this issue 4 years ago • 1 comments

Spotify WebAPI token expires after a couple of hours causing album art to show as a placeholder logo of Toastify

EXPECTED BEHAVIOUR

Spotify WebAPI token keeps working until manually deleted or deactivated from Spotify account settings

ACTUAL BEHAVIOUR

Spotify WebAPI expires after a couple of hours without doing anything. Forcing me to delete the token manually and restart Toastify for the token to stop working after a while again

STEPS TO REPRODUCE THE BEHAVIOUR

  1. Go to Toastify settings, Advanced -> Enable Spotify WebAPI (Already checked) and check the status. (Red for me token not working)
  2. Go to %LocalAppdata%/Toastify and delete spotify-token.sec, which is the previous Spotify token
  3. Restart Toastify and authorize Toastify on the Spotify page that opens up in default browser
  4. Check status of Spotify WebAPI, it should be green. The album art shows fine on the toast
  5. Use your machine normally and after some time (a couple of hours in my case) check status of Enable Spotify WebAPI again, it should be red. Album art is shown as the Toastify icon instead now
  6. You are forced to delete the token manually again and re-authorize Toastify

LOG FILE

Toastify.log

ahmedmahmud avatar Aug 08 '20 12:08 ahmedmahmud

Apparently Spotify tokens expire after 1 hour, the answer in this Stack Overflow post answers this and a solution to fix this issue, maybe it can be of use to you?: https://stackoverflow.com/questions/30372835/how-can-i-increase-the-expiry-time-of-spotify-token

ahmedmahmud avatar Aug 08 '20 12:08 ahmedmahmud