devgianlu / go-librespot

Yet another open source Spotify client, written in Go.
GNU General Public License v3.0
52 stars 7 forks source link

Retrieve token through API #22

Open txoof opened 5 months ago

txoof commented 5 months ago

Is it possible to retrieve the token through the API?

In librespot-java it is possible to fetch a token that can be used for interacting with the spotify API.

I don't see that in the documentation, but I may be misreading it or looking in the wrong place.

devgianlu commented 5 months ago

librespot-java uses the Mercury endpoint /keymaster/token/authenticated to generate token, but that does not seem to exist on spclient. go-librespot does not implement Mercury because it is an outdated Spotify API that I did not implement purposely.

Not sure if there's another way to achieve this same result through another way, but that needs investigation.

txoof commented 5 months ago

@devgianlu Thanks for explaining. If there's a way to do this, I would find it super helpful.

I'm also happy to test and work with this as you go.

txoof commented 5 months ago

Specifically, I'm interested in getting the higher resolution album art. Right now it looks like just the low resolution images are returned through the current go-librespot API.

I have an e-paper project that displays the now-playing artwork and I'd like the higher resolution images if I can get to them.

devgianlu commented 4 months ago

For the moment you might be able to retrieve those images from the official API and your own client app: https://developer.spotify.com/documentation/web-api/reference/get-an-album

txoof commented 4 months ago

That was my original plan and it works well.

The beauty of librespot zero config is ... zero configuration and no requirement for end users to need additional setup. I love this feature so much! Even the lower-resolution images are "good enough" for most use cases in terms of this project.