[GH-ISSUE #39] Always get "Lyrics for this track is not available on spotify" #29

Closed
opened 2026-02-27 19:05:23 +03:00 by kerem · 6 comments
Owner

Originally created by @Nowaha on GitHub (Mar 29, 2024).
Original GitHub issue: https://github.com/akashrchandran/spotify-lyrics-api/issues/39

It doesn't matter whether I use ?trackid= or ?url=, but with any track (even the ones given as an example in the readme), I always get:
{ "error": true, "message": "lyrics for this track is not available on spotify!" }

as a response, despite me having the lyrics on my other monitor.

Not sure if I did something wrong setup wise, I did retrieve my SP_DC minutes prior.

When running the CURL request verbose, I see this:

* Host spclient.wg.spotify.com:443 was resolved.
* IPv6: (none)
* IPv4: 35.186.224.25
*   Trying 35.186.224.25:443...
* Connected to spclient.wg.spotify.com (35.186.224.25) port 443
* ALPN: curl offers h2,http/1.1
* SSL certificate problem: unable to get local issuer certificate
* Closing connection

Setting curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); seems to be a fix, but I don't know if we should be doing this.

Originally created by @Nowaha on GitHub (Mar 29, 2024). Original GitHub issue: https://github.com/akashrchandran/spotify-lyrics-api/issues/39 It doesn't matter whether I use `?trackid=` or `?url=`, but with any track (even the ones given as an example in the readme), I always get: `{ "error": true, "message": "lyrics for this track is not available on spotify!" }` as a response, despite me having the lyrics on my other monitor. Not sure if I did something wrong setup wise, I did retrieve my `SP_DC` minutes prior. When running the CURL request verbose, I see this: ``` * Host spclient.wg.spotify.com:443 was resolved. * IPv6: (none) * IPv4: 35.186.224.25 * Trying 35.186.224.25:443... * Connected to spclient.wg.spotify.com (35.186.224.25) port 443 * ALPN: curl offers h2,http/1.1 * SSL certificate problem: unable to get local issuer certificate * Closing connection ``` Setting `curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);` seems to be a fix, but I don't know if we should be doing this.
kerem closed this issue 2026-02-27 19:05:23 +03:00
Author
Owner

@d3nnyyy commented on GitHub (Apr 6, 2024):

any updates?

<!-- gh-comment-id:2041204483 --> @d3nnyyy commented on GitHub (Apr 6, 2024): any updates?
Author
Owner

@Nowaha commented on GitHub (Apr 8, 2024):

It's still happening, but perhaps it's a persistent SSL issue on Spotify's end (so maybe we HAVE to set CURLOPT_SSL_VERIFYPEER, which is also done in another request already)
image

<!-- gh-comment-id:2041993199 --> @Nowaha commented on GitHub (Apr 8, 2024): It's still happening, but perhaps it's a persistent SSL issue on Spotify's end (so maybe we HAVE to set `CURLOPT_SSL_VERIFYPEER`, which is also done in another request already) <img width="324" alt="image" src="https://github.com/akashrchandran/spotify-lyrics-api/assets/5718297/b6e55ea4-6bf9-4083-ae4d-17a447b6b231">
Author
Owner

@aviwad commented on GitHub (Apr 15, 2024):

@akashrchandran will have to set a custom user-agent to his calls to Spotify servers. Spotify has started blocking the internal API calls with custom user-agents. I have implemented a similar thing at github.com/aviwad/LyricFever@682b60f0b1 as has github.com/raitonoberu/lyricsapi@659da1d2b9

<!-- gh-comment-id:2057917979 --> @aviwad commented on GitHub (Apr 15, 2024): @akashrchandran will have to set a custom user-agent to his calls to Spotify servers. Spotify has started blocking the internal API calls with custom user-agents. I have implemented a similar thing at https://github.com/aviwad/LyricFever/commit/682b60f0b1907d728c3975a015a6b165b2785ced as has https://github.com/raitonoberu/lyricsapi/commit/659da1d2b9064997562ddec8586f2aefd9254d42
Author
Owner

@aviwad commented on GitHub (May 6, 2024):

Nevermind Spotify has started blocking free accounts once again. Damnit.

<!-- gh-comment-id:2095216382 --> @aviwad commented on GitHub (May 6, 2024): Nevermind Spotify has started blocking free accounts once again. Damnit.
Author
Owner

@akashrchandran commented on GitHub (Jul 2, 2024):

Are you using an ad blocker or have you blacklisted spclient.wg.spotify.com in your hosts file, or something similar?

<!-- gh-comment-id:2201988649 --> @akashrchandran commented on GitHub (Jul 2, 2024): Are you using an ad blocker or have you blacklisted spclient.wg.spotify.com in your hosts file, or something similar?
Author
Owner

@Nowaha commented on GitHub (Jul 20, 2024):

@akashrchandran I do not and have not, no

<!-- gh-comment-id:2240810667 --> @Nowaha commented on GitHub (Jul 20, 2024): @akashrchandran I do not and have not, no
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-lyrics-api#29
No description provided.