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

I am getting Bad authnetication error #140

Open
d78ui98 opened this issue Mar 23, 2021 · 13 comments
Open

I am getting Bad authnetication error #140

d78ui98 opened this issue Mar 23, 2021 · 13 comments

Comments

@d78ui98
Copy link

d78ui98 commented Mar 23, 2021

[ERROR] Bad authentication, login or password incorrect ('server says: BadAuthentication')

@ouaguid
Copy link

ouaguid commented Mar 26, 2021

The email address used (or its password) is wrong, check it again by trying to connect to your Gmail account (via a browser).

@d78ui98
Copy link
Author

d78ui98 commented Mar 26, 2021

Hello ouaguid. Thanks for the reply.
The email and password used were right. Was still not able to connect.
But now I am able to fix this issue.
Thank you anyway :)

@nosnikta10
Copy link

I am also getting a "BadAuthentication" response from the server. I have verified the password and email is correct and attempted to unlock the account here "https://accounts.google.com/b/0/DisplayUnlockCaptcha". I have also tried multiple different accounts. @d78ui98 How did you end up getting auth working again?

@nosnikta10
Copy link

Turns out to be the version of requests not playing nice with the lib. I downgraded from requests version 2.25.1 to 2.20.0 and now I can sign in. I hope that helps someone else having the same issue.

@ryu-s-r
Copy link

ryu-s-r commented Apr 1, 2021

I havn't tracked all the packet but the Raccoon is working well.
I am using the GSFID and token from it.

@ryu-s-r
Copy link

ryu-s-r commented Apr 1, 2021

I found the problem. it was proxy in my case.

@Elbandi
Copy link

Elbandi commented Jun 14, 2021

I found the a possible explanation: the auth header different for different auth type:
if you use token, the auth header sould be in googleplay.py#L144 :
headers["Authorization"] = "Bearer %s" % self.authSubToken

But if you use username/password (i use "app password"), the auth header works this:
headers["Authorization"] = "GoogleLogin auth=%s" % self.authSubToken

@Jarijaas
Copy link

Turns out to be the version of requests not playing nice with the lib. I downgraded from requests version 2.25.1 to 2.20.0 and now I can sign in. I hope that helps someone else having the same issue.

The reason for why you have to do this is that the Auth API does TLS fingerprinting, so the client has to have a specific TLS signature otherwise the server rejects the requests.

I found the problem. it was proxy in my case.

For this same reason, the auth API cannot be used with most proxies because the proxy messes with the TLS fingerprint. I did some experimentation with the fingerprinting and found a valid fingerprint that at least for me has worked reliably:
https://github.com/Jarijaas/go-googleplay/tree/02045ae52a0a2f89f909d2492a53f3961c51bfaf/pkg/auth/utils.go#L95-L138

@gentoolinux
Copy link

Here is a quick and dirty patch for the Bad Authentication issue: gentoolinux@6e4c7a4
This solves the issue for me but some advanced programmer should check this before merging it.
My patch is inspired by simon-weber/gpsoauth@6a52a38

@ahm750
Copy link

ahm750 commented Aug 28, 2021

I havn't tracked all the packet but the Raccoon is working well.
I am using the GSFID and token from it.

Racoon also returned "Bad authentication" error

@martinwang2002
Copy link

Turns out to be the version of requests not playing nice with the lib. I downgraded from requests version 2.25.1 to 2.20.0 and now I can sign in. I hope that helps someone else having the same issue.

I downgraded urllib3<1.26.0 (which is same as downgrading requests) and there is no more BadAuthentication. I think there are some ssl errors causing this.

If you stick to urllib3>1.26.0, you can try #145. I think it is already fixed.

@NachumOlman
Copy link

started getting this issue again lately while trying to login.
2fa with Playstore app password.
tried solutions in linked issues and PRs, the issue persist
tried with/without vpn, the issue persist

did anybody successfully login in the last couple of days?

@besendorf
Copy link

started getting this issue again lately while trying to login. 2fa with Playstore app password. tried solutions in linked issues and PRs, the issue persist tried with/without vpn, the issue persist

did anybody successfully login in the last couple of days?

My fork works for me. I also uploaded it to pypi.
https://github.com/besendorf/googleplay-api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests