Can't create sessions: invalid_client
Closed this issue · 10 comments
Hello! Today tidalapi stopped working and I can't log in anymore.
>>> s.login_oauth_simple()
Login failed: {"status":401,"error":"invalid_client","sub_status":1005,"error_description":"Client with token *** not found"}
Traceback (most recent call last):
File "<python-input-2>", line 1, in <module>
s.login_oauth_simple()
~~~~~~~~~~~~~~~~~~~~^^
File "/home/me/***/nvenv/lib/python3.13/site-packages/tidalapi/session.py", line 598, in login_oauth_simple
login, future = self.login_oauth()
~~~~~~~~~~~~~~~~^^
File "/home/me/***/nvenv/lib/python3.13/site-packages/tidalapi/session.py", line 613, in login_oauth
link_login: LinkLogin = self.get_link_login()
~~~~~~~~~~~~~~~~~~~^^
File "/home/me/***/nvenv/lib/python3.13/site-packages/tidalapi/session.py", line 667, in get_link_login
request.raise_for_status()
~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/me/***/nvenv/lib/python3.13/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://auth.tidal.com/v1/oauth2/device_authorization
Looks like it somehow related to that issue: #95
Correct, it is currently not working due to the client_id being invalid.
So is there any particular solution or a workaround or it is what it is?
Yes, extracting a new client_id, secret and overriding the client_id, client_secret allows python-tidal to work until the next release so it seems there are no major changes to the authentication itself.
when i try to overwrite the client_id i get this when using oauth. Login failed: {"status":400,"error":"invalid_request","sub_status":1002,"error_description":"Client is not a Limited Input Device client"}
only pkce works for me right now
Yes PKCE seems to work fine. Only OAuth was broken due to the client_id being expired. The client_id that you tried to use has been extracted from a wrong type of device.
ohhh. yeah i was trying to use just my own client id from the developers portal. so this was using some hacky workaround?
Well define hacky workaround. :)
Tidalapi is unsupported by Tidal so we cannot use the client ID from the developers portal.
No really fixed, see #373
Ah darn. The client_id is, but my decoding changes was not. Will have to update again...
Edit: Fixed in https://github.com/EbbLabs/python-tidal/releases/tag/v0.8.8