PouleR / spotify-login

4 stars 0 forks source link

Login request: Response error: INVALID_CREDENTIALS #6

Open tlaifer opened 8 months ago

tlaifer commented 8 months ago

Using the steps in https://github.com/PouleR/spotify-login/issues/4 I found the client_id argument via Charlies proxying iOS which hits the login5.spotify.com endpoint (note this has to be iOS, the web app doesn't hit this endpoint). I was previously getting BAD_REQUEST using the wrong client_id. However now I get INVALID_CREDENTIALS. I am logging in with the same email/pw I to login successfully in mobile/web.

Is this login code still working for you? Any tips would be appreciated.

3052 commented 8 months ago

login works for me, but when I try to translate the code the second request fails

tlaifer commented 8 months ago

Thanks @3052. What are you providing to the login api? Both client and device id or just one? Also is the email/pw for your account a Spotify login or via Facebook/google auth.

and did the same code which fails now run without issue before? Perhaps they changed the api

thanks

3052 commented 8 months ago

Both client and device id or just one?

the server seems to only care about the client id

Also is the email/pw for your account a Spotify login or via Facebook/google auth.

this is kind of a dumb question. if you are using anything other than native Spotify credentials, you're just asking for trouble. dont do that.

and did the same code which fails now run without issue before?

if I run the PHP code here, it works fine, but I also translated the code into another language and that fails. the requests between the two languages appear to be essentially identical, so I am guessing its an issue with TLS fingerprinting or something

tlaifer commented 8 months ago

Got it, appreciate the quick response. Just wanted to double check that our auth setup was the same, which it sounds like it is.

3052 commented 8 months ago

figured out my issue - my translation was accidentally modifying the prefix value

tlaifer commented 8 months ago

nice, in what language did you write your code? It seems the challenge solver isn't working for me. The first login request gives a 200 and only after trying to solve the challenge and re-auth do I see INVALID_CREDENTIALS

I've tried changing my password as well. no dice.

thlucas1 commented 3 months ago

@3052 Just wondering if you still have the Spotify Login code that you mentioned in the above thread reply? I get a 404 not found when trying to access the https://github.com/3052/media/tree/main/blog/spotify link you mentioned.

I am looking for a way to generate a client-token value from a Spotify Login5 url with Spotify userid and password, preferably in Python, but I will take anything at this point.

Please let me know when you get a chance - thanks!

3052 commented 3 months ago

https://github.com/3052/media/tree/757dce5591eb2c01e98e3518b6968286c/blog/spotify

Baw-Appie commented 1 month ago

I add this code to SpotifyLoginClient.php and now working

$headers[] = "User-Agent: Spotify/8.9.76 iOS/18.1 (iPhone17,1)";