Open rnnyrk opened 8 months ago
Having the same issues. Bumping this.
I'm guessing this is just on purpose to discourage previews
Sometimes it works and other times it doesn't. For a brief period about 2 weeks ago it was working fine, now it's broke again. No one seems to have any real answer as to why nor any desire to fix it. These threads just all get referred back to a thread that doesn't help and was created almost 10 years ago so don't hold your breath for a fix.
I'm having the same problem when using credentials flow. Some tracks do have an preview url, some don't.
Follow up on this closed issue on an older (but archived) official Spotify repository https://github.com/spotify/web-api/issues/148
I'm using the Credentials Flow for fetching tracks of a specific artist. Although unfortunately most preview urls (e.g. Drake, Tame Impale, 2pac, etc etc.) are empty, making my application not able to use this.
As the linked issue stated, there is a workaround fetching the embed URL and scraping the preview url from that page. But as the issue mentioned as well: "Not a fan of these kinds of workarounds but I genuinely have no idea why Spotify would make an otherwise-public information available through
Authorization Code
but notClient Credentials
"So it seems like the
Authorization Code
flow does include preview URLs, but theClient Credentials
does not include those URLs. The documentation does state that it can be null, but it doesn't say why it is onlynull
for theClient Credentials
flow. There where also comments about theavailableMarkets
, but changing theGET
parameter formarket=NL
orUS
/SE
doesn't change anything in the results either.Why is this happening? And how to potentially fix it? Or is there no other solution than scraping the embed page for the preview url? Which really is a nasty workaround for something that is build-in, but doesn't work as expected for one particular flow.