Persistant "Bad Credentials" error #303

Open
opened 2025-09-27 18:16:16 -04:00 by baritoneanticyclone · 4 comments
baritoneanticyclone commented 2025-09-27 18:16:16 -04:00 (Migrated from github.com)

Not sure if this is a bug, it has been like this for about two months by now for me but no one else has posted about it so it may just be something on my end. Fresh install, I've tried passing username/password though keys and by pointing to the credentials file with --credentials-location (despite not knowing how credentials.json is supposed to be formatted and building the .json file myself due to no docs). My spotify account is fine and not banned, but still every time I try to use zotify I get the same exact error:

Traceback (most recent call last):
  File "/home/[my computer]/.local/bin/zotify", line 8, in <module>
    sys.exit(main())
  File "/home/[my computer]/.local/lib/python3.10/site-packages/zotify/__main__.py", line 64, in main
    args.func(args)
  File "/home/[my computer]/.local/lib/python3.10/site-packages/zotify/app.py", line 21, in client
    Zotify(args)
  File "/home/[my computer]/.local/lib/python3.10/site-packages/zotify/zotify.py", line 21, in __init__
    Zotify.login(args)
  File "/home/[my computer]/.local/lib/python3.10/site-packages/zotify/zotify.py", line 32, in login
    cls.SESSION = Session.Builder(conf).stored_file(cred_location).create()
  File "/home/[my computer]/.local/lib/python3.10/site-packages/librespot/core.py", line 1679, in create
    session.authenticate(self.login_credentials)
  File "/home/[my computer]/.local/lib/python3.10/site-packages/librespot/core.py", line 972, in authenticate
    self.__authenticate_partial(credential, False)
  File "/home/[my computer]/.local/lib/python3.10/site-packages/librespot/core.py", line 1383, in __authenticate_partial
    raise Session.SpotifyAuthenticationException(ap_login_failed)
librespot.core.Session.SpotifyAuthenticationException: BadCredentials

This error also occurs when I use other accounts. I've combed through all the issues and discussions pages but nothing has helped. Anyone else running into this problem? Anyone know what a solution is?

Not sure if this is a bug, it has been like this for about two months by now for me but no one else has posted about it so it may just be something on my end. Fresh install, I've tried passing username/password though keys and by pointing to the credentials file with --credentials-location (despite not knowing how credentials.json is supposed to be formatted and building the .json file myself due to no docs). My spotify account is fine and not banned, but still every time I try to use zotify I get the same exact error: ``` Traceback (most recent call last): File "/home/[my computer]/.local/bin/zotify", line 8, in <module> sys.exit(main()) File "/home/[my computer]/.local/lib/python3.10/site-packages/zotify/__main__.py", line 64, in main args.func(args) File "/home/[my computer]/.local/lib/python3.10/site-packages/zotify/app.py", line 21, in client Zotify(args) File "/home/[my computer]/.local/lib/python3.10/site-packages/zotify/zotify.py", line 21, in __init__ Zotify.login(args) File "/home/[my computer]/.local/lib/python3.10/site-packages/zotify/zotify.py", line 32, in login cls.SESSION = Session.Builder(conf).stored_file(cred_location).create() File "/home/[my computer]/.local/lib/python3.10/site-packages/librespot/core.py", line 1679, in create session.authenticate(self.login_credentials) File "/home/[my computer]/.local/lib/python3.10/site-packages/librespot/core.py", line 972, in authenticate self.__authenticate_partial(credential, False) File "/home/[my computer]/.local/lib/python3.10/site-packages/librespot/core.py", line 1383, in __authenticate_partial raise Session.SpotifyAuthenticationException(ap_login_failed) librespot.core.Session.SpotifyAuthenticationException: BadCredentials ``` This error also occurs when I use other accounts. I've combed through all the issues and discussions pages but nothing has helped. Anyone else running into this problem? Anyone know what a solution is?
Phixygamer commented 2025-09-28 07:28:55 -04:00 (Migrated from github.com)

I am having the same issue. Never been able to log in and it doesn't seem to matter if they're my correct or incorrect credentials.

I am having the same issue. Never been able to log in and it doesn't seem to matter if they're my correct or incorrect credentials.
swadeshp commented 2025-10-25 17:52:04 -04:00 (Migrated from github.com)

Same here. Is there a solution?

Same here. Is there a solution?
rconjaerts commented 2025-10-26 08:37:58 -04:00 (Migrated from github.com)
This worked for me: https://github.com/zotify-dev/zotify/issues/174#issuecomment-2295436663
baritoneanticyclone commented 2025-11-07 03:53:59 -05:00 (Migrated from github.com)

This worked for me: #174 (comment)

Install the rust toolchain

Kind of insane that you have to go to such messy lengths just to build and run a script to generate a file for a work around to a problem that you have to fix before you can ever use Zotify. If I'm not mistaken (which I very well may be because docs and info for Zotify are nonexistent) you NEED credentials.json to download anything. Without this workaround, how does Zotify get the credentials? If they're generated, can't Zotify just generate them again? If they're scraped, can't they be scraped again? If credentials aren't required, why can't it download without them?

Also, so I don't sound like a complete a$$, I did the workaround already. It doesn't work.

> This worked for me: [#174 (comment)](https://github.com/zotify-dev/zotify/issues/174#issuecomment-2295436663) > Install the rust toolchain Kind of insane that you have to go to such messy lengths just to build and run a script to generate a file for a work around to a problem that you have to fix before you can ever use Zotify. If I'm not mistaken (which I very well may be because docs and info for Zotify are nonexistent) you NEED credentials.json to download anything. Without this workaround, how does Zotify get the credentials? If they're generated, can't Zotify just generate them again? If they're scraped, can't they be scraped again? If credentials aren't required, why can't it download without them? Also, so I don't sound like a complete a$$, I did the workaround already. It doesn't work.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
zotify-dev/zotify#303
No description provided.