Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Device Authorizatoion Failed #797

Closed
Dustman259 opened this issue Jan 18, 2022 · 56 comments
Closed

[BUG] Device Authorizatoion Failed #797

Dustman259 opened this issue Jan 18, 2022 · 56 comments
Labels
bug Something isn't working no-issue-activity

Comments

@Dustman259
Copy link

Capture

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

Version

Bug description
Device Authorizatoion Failed

Screenshot

@Dustman259 Dustman259 added the bug Something isn't working label Jan 18, 2022
@talios
Copy link

talios commented Jan 18, 2022

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
Copy link

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

@aberridg
Copy link

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
Copy link

charleywright commented Jan 18, 2022

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
Copy link

marcbth commented Jan 18, 2022

hello from Germany,

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

@AminurAlam
Copy link

AminurAlam commented Jan 18, 2022

try this using this in apiKey.py

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

@marcbth
Copy link

marcbth commented Jan 18, 2022

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
Copy link

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

@xw0wx0xw0
Copy link

Screenshot_20220119_090314_com termux
Tidal-dl Device Authorizatoion Failed

@joeblowout
Copy link

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
Copy link

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
Copy link

charleywright commented Jan 19, 2022

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
Copy link

Screenshot_20220119_161456_com termux
Not working

@joeblowout
Copy link

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
Copy link

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
Copy link

m4k3m0n3y420 commented Jan 19, 2022

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
Copy link

morguldir/python-tidal@50f1afc appears to introduce a new client secret (with some obfuscation: morguldir/python-tidal@74adfe1)

@Ripper2909
Copy link

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
Copy link
Contributor

Same here unfortunately

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

@Sizzahandz
Copy link

Sizzahandz commented Jan 20, 2022 via email

@charleywright
Copy link

charleywright commented Jan 20, 2022

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
Copy link

talios commented Jan 20, 2022 via email

@octaviz
Copy link

octaviz commented Jan 20, 2022

Working with this ID & secret

@GiuDiMax
Copy link

GiuDiMax commented Jan 20, 2022

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
Copy link

Ripper2909 commented Jan 20, 2022

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
Copy link

szczups commented Jan 20, 2022

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?

@CornelisJ
Copy link

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

@xw0wx0xw0
Copy link

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
Copy link

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
Copy link

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
Copy link

Screenshot_20220121_083723_com termux
Not working

@RaBlackWolf
Copy link

RaBlackWolf commented Jan 21, 2022

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
Copy link

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
Copy link

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

@ApolloGods
Copy link

ApolloGods commented Jan 23, 2022

Thanks auth is ok with option 5 and 3

@Arizonamarley
Copy link

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
Copy link

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

@ScubaAlex-WPG
Copy link

ScubaAlex-WPG commented Feb 1, 2022

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

@xw0wx0xw0
Copy link

Screenshot_20220201_182917_com termux
Not working!

@charleywright
Copy link

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
Copy link

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
Copy link

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
Copy link

divadsn commented Feb 3, 2022

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
Copy link

Sizzahandz commented Feb 3, 2022 via email

@ArturSierzant
Copy link

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.

@divadsn
Copy link

divadsn commented Feb 5, 2022 via email

@paulforegan
Copy link

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.

It helped me! Took a while to set up, but just tried it and was able to download no problem. Thanks!

@codethought
Copy link

I’d try it, but I do not have a Fire Stick… :-/

@charleywright
Copy link

I’d try it, but I do not have a Fire Stick… :-/

I added a script and tutorial on how to extract the keys from the android APK here. I'm going to work on an automated program that tests stream quality as well soon, but I linked a script in the comments of that gist that works too

@codethought
Copy link

I’d try it, but I do not have a Fire Stick… :-/

I added a script and tutorial on how to extract the keys from the android APK here. I'm going to work on an automated program that tests stream quality as well soon, but I linked a script in the comments of that gist that works too

Just tried it.. however tidal appears to have changed their APK packaging and the client id and secret or no longer stored in string files.. :-/

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-issue-activity
Projects
None yet
Development

Successfully merging a pull request may close this issue.