yaronzz / Tidal-Media-Downloader

Download 'TIDAL' Music On Windows/Linux/MacOs (PYTHON/C#)
http://doc.yaronzz.com/post/tidal_dl_installation/
Apache License 2.0
3.42k stars 475 forks source link

[BUG] Device Authorizatoion Failed #797

Closed Dustman259 closed 2 years ago

Dustman259 commented 2 years ago

Capture

TIDAL-DL <!-i tidal-dl -->

Version

Bug description Device Authorizatoion Failed

Screenshot

talios commented 2 years ago

Just tried this pre-release and get the same thing - interestingly, after logging out I was able to log back in - but then gets media-type errors being reported.

[ERR] Le cœur noir charbon.Can't get the streamUrl, type is application/dash+xml
[ERR] De tes yeux bleus perlés.Can't get the streamUrl, type is application/dash+xml
[ERR] Des torrents de coups.Can't get the streamUrl, type is application/dash+xml

is what I get after managing to login.

KARA4ever commented 2 years ago

I just update the tidal-dl and find same problem. Please advise.

aberridg commented 2 years ago

Looks like we need another client ID/secret from the Fire stick! I'm wondering if there is a better way to do this auth...

charleywright commented 2 years ago

Yup, they removed OmDtrzFgyVVL6uW56OnFA2COiabqm. I wrote about some stuff here but they all use MPEG-DASH at some point

EDIT: I've tried my fire tv stick, there is no tidal app for it (I'm in uk, idk if it's just in other regions)

marcbth commented 2 years ago

hello from Germany,

i have a fire tv stick. can i help in any way?

AminurAlam commented 2 years ago

try this using this in apiKey.py

{
'clientId': '7m7Ap0JC9j1cOM3n',
'clientSecret': 'vRAdA108tlvkJpTsGZS8rGZ7xTlbJ0qaZ2K9saEzsgY='
}
marcbth commented 2 years ago

this is the same key as in your source code.

it works. i can log on to the website.

my problem is rather that I use ompd.pl.

Antonio-Tully-Spinozzi commented 2 years ago

I have updated with a new clientId but receive this error msg: [ERR] Can't get the streamUrl, type is application/dash+xml

xw0wx0xw0 commented 2 years ago

Screenshot_20220119_090314_com termux Tidal-dl Device Authorizatoion Failed

joeblowout commented 2 years ago

try this using this in apiKey.py

{
'clientId': '7m7Ap0JC9j1cOM3n',
'clientSecret': 'vRAdA108tlvkJpTsGZS8rGZ7xTlbJ0qaZ2K9saEzsgY='
}

It works, however seems like this credential is for MQA download, else error option. Thx anyway

In my case, option 1 MQA works just fine, 0 and 2 not working.

I need quality lower than mqa coz the album i wanna download isnt available in mqa

joeblowout commented 2 years ago

try this using this in apiKey.py

{
'clientId': '7m7Ap0JC9j1cOM3n',
'clientSecret': 'vRAdA108tlvkJpTsGZS8rGZ7xTlbJ0qaZ2K9saEzsgY='
}

By the way, how do I obtain this? Do I need to resort to sniffing application?

charleywright commented 2 years ago

try this using this in apiKey.py

{
'clientId': '7m7Ap0JC9j1cOM3n',
'clientSecret': 'vRAdA108tlvkJpTsGZS8rGZ7xTlbJ0qaZ2K9saEzsgY='
}

As I documented, this will provide one file for HI_RES quality (MQA), but LOSSLESS and below use MPEG-DASH, which this downloader doesn't support and neither does mine (variable bitrate is not lossless, Tidal is now serving MQA or variable bitrate, is this not exactly what they wanted to not do when they started?)

Anyway, using the desktop app key (ReCaptcha V3 protected, grab it using these instructions) to provide lossless and the above key for mqa you can get a high quality file for any song. Desktop app files are encrypted, but that is supported already

xw0wx0xw0 commented 2 years ago

Screenshot_20220119_161456_com termux Not working

joeblowout commented 2 years ago

try this using this in apiKey.py

{
'clientId': '7m7Ap0JC9j1cOM3n',
'clientSecret': 'vRAdA108tlvkJpTsGZS8rGZ7xTlbJ0qaZ2K9saEzsgY='
}

As I documented, this will provide one file for HI_RES quality (MQA), but LOSSLESS and below use MPEG-DASH, which this downloader doesn't support and neither does mine (variable bitrate is not lossless, Tidal is now serving MQA or variable bitrate, is this not exactly what they wanted to not do when they started?)

Anyway, using the desktop app key (ReCaptcha V3 protected, grab it using these instructions) to provide lossless and that key for mqa you can get a high quality file for any song. Desktop app files are encrypted, but that is supported already I see, thx for info. does this mean lossless and below is dead until further notice?

Sizzahandz commented 2 years ago

Any idea how to get the command line version working again? I still have the same error

Screen Shot 2022-01-19 at 2 52 34 PM
m4k3m0n3y420 commented 2 years ago

i was able to get it working by selecting apikey 1 then registering the device.

Edit: I was only able to authenticate, however this did not allow me to download any files.

ilikepeaches commented 2 years ago

https://github.com/morguldir/python-tidal/commit/50f1afcd2079efb2b4cf694ef5a7d67fdf619d09 appears to introduce a new client secret (with some obfuscation: https://github.com/morguldir/python-tidal/commit/74adfe11dd9d40112757d19b81fb574cf6fcad32)

Ripper2909 commented 2 years ago

i was able to get it working by selecting apikey 1 then registering the device.

Edit: I was only able to authenticate, however this did not allow me to download any files.

Same here unfortunately

Frikilinux commented 2 years ago

Same here unfortunately

The APIKey 1 only can download mqa/master tracks and you need a TIDAL HiFi Plus plan.

Sizzahandz commented 2 years ago

I have the HiFi plus plan.

On Wed, Jan 19, 2022 at 8:01 PM ZOTTA @.***> wrote:

Same here unfortunately

The APIKey 1 only can download mqa/master tracks and you need a TIDAL HiFi Plus plan.

— Reply to this email directly, view it on GitHub https://github.com/yaronzz/Tidal-Media-Downloader/issues/797#issuecomment-1017012825, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADU4SOK7KKAQU276XKSE2LDUW5NHXANCNFSM5MG2Z7ZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

-- Sizzahandz CEO Crooklyn Clan Inc. www.crooklynclan.net

charleywright commented 2 years ago

morguldir/python-tidal@50f1afc appears to introduce a new client secret

Works, here is the client ID and secret EDIT: THIS HAS BEEN REMOVED BY TIDAL AND NO LONGER WORKS

id=8SEZWa4J1NVC5U5Y
secret=owUYDkxddz+9FpvGX24DlxECNtFEMBxipU0lBfrbq60=

The other link posted by @ilikepeaches gives wc8j_yBJd20zOmx0 which is used for standard username/password login. It appears to be valid, because it returns a 403 whereas random characters return a 401

talios commented 2 years ago

Nice - and this seems to work for both MQA and non-MQA.

@.***

https://github.com/morguldir/python-tidal/commit/50f1afcd2079efb2b4cf694ef5a7d67fdf619d09 appears to introduce a new client secret

Works, here is the client ID and secret

Message ID: @.*** com>

octaviz commented 2 years ago

Working with this ID & secret

GiuDiMax commented 2 years ago

in my case it doesn't seem to work. I set up the apikey file like this. @charleywright

{
    'platform': 'Fire TV',
    'formats': 'Normal/High/HiFi(No Master)',
    'clientId': '8SEZWa4J1NVC5U5Y',
    'clientSecret': 'owUYDkxddz+9FpvGX24DlxECNtFEMBxipU0lBfrbq60=',
},
Ripper2909 commented 2 years ago

morguldir/python-tidal@50f1afc appears to introduce a new client secret

Works, here is the client ID and secret

id=8SEZWa4J1NVC5U5Y
secret=owUYDkxddz+9FpvGX24DlxECNtFEMBxipU0lBfrbq60=

The other link posted by @ilikepeaches gives wc8j_yBJd20zOmx0 which is used for standard username/password login. It appears to be valid, because it returns a 403 whereas random characters return a 401

These credentials (put in apiKey.py for the first array) allow me to log in but not to download anything in HiFi, does anyone knows what I did wrong please ?

image
> > [morguldir/python-tidal@50f1afc](https://github.com/morguldir/python-tidal/commit/50f1afcd2079efb2b4cf694ef5a7d67fdf619d09) appears to introduce a new client secret
> 
> Works, here is the client ID and secret
> 
> ```
> id=8SEZWa4J1NVC5U5Y
> secret=owUYDkxddz+9FpvGX24DlxECNtFEMBxipU0lBfrbq60=
> ```
> 
> The other link posted by @ilikepeaches gives `wc8j_yBJd20zOmx0` which is used for standard username/password login. It appears to be valid, because it returns a 403 whereas random characters return a 401

in my case it doesn't seem to work. I set up the apikey file like this.

{
    'platform': 'Fire TV',
    'formats': 'Normal/High/HiFi(No Master)',
    'clientId': '8SEZWa4J1NVC5U5Y',
    'clientSecret': 'owUYDkxddz+9FpvGX24DlxECNtFEMBxipU0lBfrbq60=',
},

Same as you

szczups commented 2 years ago

Hi @Ripper2909 ,

updating the .py files doesn't work you need to install tidal-dl for development (https://github.com/yaronzz/Tidal-Media-Downloader) - last section of readme.

@charleywright huge kudos for this. Do you think there's a way to obtain my own iOS app client_id (I also have Muso device with Tidal connect) so I won't get locked out in the future from using this service?

PS @charleywright do you have a place where I can send my grattitude? crypto wallet?

qwertytop94 commented 2 years ago

How can I change it. I use android via termux

Ripper2909 commented 2 years ago

Hi @Ripper2909 ,

updating the .py files doesn't work you need to install tidal-dl for development (https://github.com/yaronzz/Tidal-Media-Downloader) - last section of readme.

@charleywright huge kudos for this. Do you think there's a way to obtain my own iOS app client_id (I also have Muso device with Tidal connect) so I won't get locked out in the future from using this service?

PS @charleywright do you have a place where I can send my grattitude? crypto wallet?

OMG it works thank you @szczups !

codethought commented 2 years ago

When I run

python3 setup.py install

I get an egg file.. but no tidal-dl command... how do I get myself back to running tidal-dl at the command line?

EDIT - worked around it by just running the Tidal-Media-Downloader/TIDALDL-PY/build/lib/tidal_dl/__init__.py via python3

xw0wx0xw0 commented 2 years ago

It doesn't work for me, it shows errors, I have to wait for tidal-dl to be updated because that time it was the same after 3 days

audiogamble commented 2 years ago

Also getting the same error here. Any fixes available?

CornelisJ commented 2 years ago

Authorization problem is fixed in tidal-dl v2022.01.21.1. Hint: first select a valid APIkey. Thank you very much yaronzz!

xw0wx0xw0 commented 2 years ago

Authorization problem is fixed in tidal-dl v2022.01.21.1. Hint: first select a valid APIkey. Thank you very much yaronzz!

Which key is right for you? You’re just writing but not showing anything

RaBlackWolf commented 2 years ago

Authorization problem is fixed in tidal-dl v2022.01.21.1. Hint: first select a valid APIkey. Thank you very much yaronzz!

Which key is right for you? You’re just writing but not showing anything

There are literally only two options that show valid when you select option 5. Pick one

xw0wx0xw0 commented 2 years ago

Authorization problem is fixed in tidal-dl v2022.01.21.1. Hint: first select a valid APIkey. Thank you very much yaronzz!

Which key is right for you? You’re just writing but not showing anything

There are literally only two options that show valid when you select option 5. Pick one

All appointed only on the computer and I need it on android

xw0wx0xw0 commented 2 years ago

Screenshot_20220121_083723_com termux Not working

RaBlackWolf commented 2 years ago

Screenshot_20220121_083723_com termux

Not working

Use option 2 and make sure quality is set to master, has to match if you chose master only option

xw0wx0xw0 commented 2 years ago

Screenshot_20220121_083723_com termux Not working

Use option 2 and make sure quality is set to master, has to match if you chose master only option

It finally works! Thank you!

ScubaAlex-WPG commented 2 years ago

Select 3 on the option 5 and get a new code. image worked for me! Thanks developer for what you do.

ApolloGods commented 2 years ago

Thanks auth is ok with option 5 and 3

Arizonamarley commented 2 years ago

intente esto usando esto en apiKey.py

{
 'IdCliente': '7m7Ap0JC9j1cOM3n', 
'SecretoCliente': 'vRAdA108tlvkJpTsGZS8rGZ7xTlbJ0qaZ2K9saEzsgY=' 
}

Funciona, sin embargo, parece que esta credencial es para la descarga de MQA, de lo contrario, la opción de error. Gracias de todos modos

En mi caso, la opción 1 MQA funciona bien, 0 y 2 no funcionan.

Necesito una calidad inferior a mqa porque el álbum que quiero descargar no está disponible en mqa

The same for me? Any solution?

xw0wx0xw0 commented 2 years ago

Screenshot_20220201_111533_com termux I can't send anything in master quality because of an error

ScubaAlex-WPG commented 2 years ago

Same as commented above. MQA working, but regular files are not. image My Api Key is set to 3. image

xw0wx0xw0 commented 2 years ago

Screenshot_20220201_182917_com termux Not working!

charleywright commented 2 years ago

It seems Tidal are monitoring this thread or scanning source, the key I posted 12 days ago here has been removed. Currently only MQA is downloadable using

id: 7m7Ap0JC9j1cOM3n
secret: vRAdA108tlvkJpTsGZS8rGZ7xTlbJ0qaZ2K9saEzsgY=
xw0wx0xw0 commented 2 years ago

It seems Tidal are monitoring this thread or scanning source, the key I posted 12 days ago here has been removed. Currently only MQA is downloadable using

id: 7m7Ap0JC9j1cOM3n
secret: vRAdA108tlvkJpTsGZS8rGZ7xTlbJ0qaZ2K9saEzsgY=

Screenshot_20220201_201608_com termux Me not working! Not mqa download!

codethought commented 2 years ago

It seems Tidal are monitoring this thread or scanning source, the key I posted 12 days ago here has been removed. Currently only MQA is downloadable using

id: 7m7Ap0JC9j1cOM3n
secret: vRAdA108tlvkJpTsGZS8rGZ7xTlbJ0qaZ2K9saEzsgY=

Probably correct.. or they have moved to a rotating API key and secret for Fire Sticks etc..

If that's the case then I'll probably discontinue my Tidal subscription.. I can just rip the CD's I own myself.. they were just saving me the trouble..

divadsn commented 2 years ago

The fix would be to actually support MPEG-DASH playback, which isn't that difficult as it seems, though it would require using ffmpeg to download the audio if you want to have that implemented as painlessly as possible.

Here's a working proof of concept that I wrote for https://github.com/morguldir/python-tidal:

import base64
import subprocess

# download MPEG-DASH manifest
params = {
    "playbackmode": "STREAM",
    "audioquality" : track.session.config.quality,
    "assetpresentation": "FULL",
}
request = track.requests.request("GET", "tracks/%s/playbackinfopostpaywall" % track.id, params)
manifest = base64.b64decode(request.json()['manifest'])

# stream from manifest using ffmpeg
p = subprocess.Popen(['ffmpeg', '-f', 'dash', '-i', 'pipe:', '-c', 'copy', file_path], stdin=subprocess.PIPE)
p.communicate(input=manifest)

# check if ffmpeg exited without error
if p.returncode != 0:
    raise FLACNoHeaderError()
Sizzahandz commented 2 years ago

yes that works, it's not a major task to have ffmpeg either, please do it!

On Thu, Feb 3, 2022 at 3:10 PM David Sn @.***> wrote:

The fix would be to actually support MPEG-DASH, which isn't that difficult as it seems, though it would require using ffmpeg to download the audio if you want to have that implemented as painlessly as possible.

Here's a working proof of concept that I wrote for https://github.com/morguldir/python-tidal:

download MPEG-DASH manifest

params = { "playbackmode": "STREAM", "audioquality" : track.session.config.quality, "assetpresentation": "FULL", } request = track.requests.request("GET", "tracks/%s/playbackinfopostpaywall" % track.id, params) manifest = base64.b64decode(request.json()['manifest'])

stream from manifest using ffmpeg

p = subprocess.Popen(['ffmpeg', '-f', 'dash', '-i', 'pipe:', '-c', 'copy', file_path], stdin=subprocess.PIPE) p.communicate(input=manifest)

check if ffmpeg exited without error

if p.returncode != 0: raise FLACNoHeaderError()

— Reply to this email directly, view it on GitHub https://github.com/yaronzz/Tidal-Media-Downloader/issues/797#issuecomment-1029358757, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADU4SOO4OLSDCINKDEV6TJLUZLOLZANCNFSM5MG2Z7ZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

-- Sizzahandz CEO Crooklyn Clan Inc. www.crooklynclan.net

ArturSierzant commented 2 years ago

Hi, I think that the best way is to get your own client_id and client_secret. I tried to briefly describe it here: https://ompd.pl/getting-tidal-login-data. Maybe it will help someone.