mirror of
https://github.com/devgianlu/go-librespot.git
synced 2026-04-26 05:15:49 +03:00
[GH-ISSUE #22] Retrieve token through API #13
Labels
No labels
bug
enhancement
pull-request
spotify-side
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/go-librespot#13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @txoof on GitHub (Feb 26, 2024).
Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/22
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 on GitHub (Feb 28, 2024):
librespot-javauses the Mercury endpoint/keymaster/token/authenticatedto generate token, but that does not seem to exist on spclient.go-librespotdoes 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 on GitHub (Feb 28, 2024):
@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 on GitHub (Feb 28, 2024):
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 on GitHub (Mar 3, 2024):
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 on GitHub (Mar 4, 2024):
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.
@felixstorm commented on GitHub (Sep 16, 2024):
@devgianlu Is there any reason why we should not use the token we get from login5 and that go-librespot uses to authorize to the web api also for passthrough-requests received by the go-librespot API?
I implemented an API endpoint for it and during a few short tests it seems to work without any issues so far:
github.com/felixstorm/go-librespot@24707f74e5If you would like me to I will be happy to open a PR for it.
@devgianlu commented on GitHub (Sep 16, 2024):
You are right, that should work. The token is even being used for the web API passthrough.
@felixstorm Yes! Feel free to open a PR!
@txoof commented on GitHub (Sep 17, 2024):
I'm eager to test this out if that's helpful.