akashrchandran / spotify-lyrics-api

A Rest API for fetching lyrics from Spotify which is powered by Musixmatch. Commandline version is available at akashrchandran/syrics.
http://github.akashrchandran.in/spotify-lyrics-api/
GNU General Public License v3.0
344 stars 28 forks source link

Heroku app dead #43

Open TomasHubelbauer opened 3 weeks ago

TomasHubelbauer commented 3 weeks ago

Hi, I am trying to check out the demo link at https://spotify-lyric-api.herokuapp.com/?trackid=5f8eCNwTlr0RJopE9vQ6mB but Heroku returns a "nothing is here" error.

image

At the same time, I see in #41 that lyrics is now a premium Spotify feature, so I am wondering if the app can no longer use that Spotify API even if it was still up?

TomasHubelbauer commented 3 weeks ago

I've not tried running this repository locally, but I have reversed the unofficial lyrics API just now to see if it still works and it does, but I don't have a non-Premium token to test it with. It works with my Premium token and here is a JavaScript snippet in case it is useful to anyone:

const response = await fetch(
  `https://spclient.wg.spotify.com/color-lyrics/v2/track/${id}?format=json`,
  {
    headers: { authorization: `Bearer ${token}`, 'app-platform': 'WebPlayer' }
  }
);

if (response.ok) {
  const data = await response.json();
  // ...data.lyrics
}
else {
  // Unauthorized, Not Found etc.
}