mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 16:25:52 +03:00
[GH-ISSUE #1436] Login failed #646
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#646
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 @MrBuddyCasino on GitHub (Jan 8, 2025).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1436
Description
Running
examples/play.rswith a freshly created token gives an "Error connecting: Permission denied { Login failed with reason: Bad credentials }" message.Version
0.6.0
How to reproduce
Run the example player with your token and some track ID.
A token can be obtained by making an example app in the developer portal and calling:
Log
Not sure how
--verboseapplies to the example player. Console says:Host (what you are running
librespoton):Additional Information
I also tried if
Credentials::with_password()instead of::with_access_token()would work, but same error.I also tried latest
devbranch but I got "HostUnreachable, message: "No route to host"":@kingosticks commented on GitHub (Jan 8, 2025):
First up, I don't think we support the client credentials flow. I don't think it makes much sense for librespot. I've never tested it, I've no idea if it works. Good luck if that's really your intention/
If you just wanted to get a valid token then our access token documentation specifies some ways to obtain a valid token. If you chose the second way, then you'll need to use the auth code flow.
You can also get a token using https://github.com/librespot-org/librespot/blob/dev/examples/get_token.rs .
I can think of no reason the dev branch would give you a "No route to host" error, I would guess that's a problem in your network. There's also nothing in latest dev that should impact basic session login.
@MrBuddyCasino commented on GitHub (Jan 8, 2025):
Thanks for the detailed reply, and sorry for wasting your time - I used the token from
https://open.spotify.com/get_access_tokenand that did the trick. Feel free to close this!