mirror of
https://github.com/devgianlu/go-librespot.git
synced 2026-04-26 21:35:49 +03:00
[GH-ISSUE #64] Question about spotify_token #52
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#52
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 @hecht0r on GitHub (Aug 16, 2024).
Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/64
Hi,
while using go-librespot with zeroconf works like a charm i want to use stored credentials. With zeroconf i have to select go-librespot as device manually in my spotify client. After that it works perfectly.
I tried to get my access_token via
and put it in my config.yml like this:
After starting go-libresport i get error
FATA[0001] failed running with username and spotify token error="failed authenticating accesspoint with username and spotify token: failed authenticating: failed login: BadCredentials"What am I doing wrong? Thank you for any help
@devgianlu commented on GitHub (Aug 16, 2024):
You need to request a token with the correct scopes, they are listed here:
github.com/devgianlu/go-librespot@b9bc8c87f1/session/session.go (L101-L126)If that feats you, the
interactivelogin mode is also available which will handle the OAuth2 flow for you.@hecht0r commented on GitHub (Aug 16, 2024):
Interactive unfortunately doesn't work.
FATA[0000] unknown credentials: interactiveconfig.yml looks like this:
i am using the latest prebuild executable go-librespot_linux_arm64.tar.gz
@devgianlu commented on GitHub (Aug 16, 2024):
This feature has not been released yet, to test it you need to compile yourself or wait for the next release.
@ChristianRamseier commented on GitHub (Aug 21, 2024):
Looking forward to see the interactive feature released. It would be nice if the redirect url will be configurable (i.e. a hostname instead of 127.0.0.1).
@devgianlu commented on GitHub (Aug 21, 2024):
We are using the client ID used by Spotify in its official client, so I am guessing they have locked it down to 127.0.0.1.
@ChristianRamseier commented on GitHub (Aug 21, 2024):
Hmm, ok. If they indeed locked it down, it means the browser with the login window needs to run on the same host as librespot?
@devgianlu commented on GitHub (Aug 21, 2024):
You can copy the login URL go-librespot gives you into your browser, complete the signin and when it redirects you to 127.0.0.1 you copy that and do
curl "..."on the device where go-librespot runs. It is annoying, but you need to do it only once.