librespot-golang icon indicating copy to clipboard operation
librespot-golang copied to clipboard

"authentication failed"

Open nolanm1122 opened this issue 5 years ago • 6 comments

I attempted to run the main.go with my personal username and password as flags, but program throws "authentication failed" error every time. I know these credentials are correct and that it's parsing the flags properly and passing them to librespot.Login function. I've also tried with another valid account and gotten same response. Must be an issue with how login is handled, etc.

nolanm1122 avatar Mar 15 '20 15:03 nolanm1122

Not that I have a solution for you, but I can say "It works just fine for me", so I suspect it's something you are doing wrong.

drunlade avatar Apr 08 '20 13:04 drunlade

Just throwing my experience in as well, I get the same issue..

winterscar avatar Jan 20 '21 22:01 winterscar

Same issue: login failed with username/password. I added a "vote": please add :+1: to issue top if username+password authentication fails for you too!

joonas-fi avatar Apr 09 '22 10:04 joonas-fi

Seems to be about using a free account. After I updated to Premium, it started working.

This is based on librespot, and it says:

Note: librespot only works with Spotify Premium. This will remain the case. We will not support any features to make librespot compatible with free accounts, such as limited skips and adverts.

See also: https://github.com/librespot-org/librespot/issues/862

joonas-fi avatar Apr 09 '22 16:04 joonas-fi

This issue can be closed.

corny avatar Apr 16 '22 17:04 corny

Pro-tip: if the auth blob doesn't work for you, you can generate the auth blob in some other software (like the Rust version of librespot which seems very actively maintained) and steal its auth blob for use in librespot-golang!

If you use the Rust librespot, you can run:

$ target/release/librespot --name foobar --username <yourUsername>

it asks for your password, and then you can find the auth blob in cache/credentials.json under key auth_data. Make sure to base64-decode the value and then use it as blob.bin content (don't include newline) as here:

https://github.com/librespot-org/librespot-golang/blob/31669e5a889fb671269fab6b87322b3159119f90/main.go#L42

joonas-fi avatar Jun 18 '22 18:06 joonas-fi