NoMore201 / googleplay-api

Google Play Unofficial Python API
Other
410 stars 208 forks source link

Fix auth error #114

Open matlink opened 4 years ago

matlink commented 4 years ago

Authentication has changed, see https://github.com/whyorean/playstore-api-v2/blob/master/src/main/java/com/dragons/aurora/playstoreapiv2/GooglePlayAPI.java#L832

gurnec commented 4 years ago

I just submitted PR #116 to hopefully fix downloads of purchased apps (my PR works for me anyways). If I apply both #116 and your #114, purchased app downloads go back to broken for me (and #114 alone does not fix them for me).

I'm just adding this comment as an FYI... sorry that it's not much help.

(The reason I even found your PR is that the error message I was getting is identical to the one in #113, "Error while retrieving information from server. DF-DFERH-01", although the traceback in #113 seems to be related to gplaycli's --update; not, as it was for me, downloads of purchased apps.)

matlink commented 4 years ago

It looks like using credentials requires to use 'GoogleLogin auth=%s' while using tokens requires to have 'Bearer %s' in the Authentication header https://github.com/whyorean/playstore-api-v2/blob/master/src/main/java/com/dragons/aurora/playstoreapiv2/GooglePlayAPI.java#L331

matlink commented 4 years ago

@gurnec I've pushed a commit which should fix errors when using credentials. Could you test it please?

gurnec commented 4 years ago

Sorry for the delay... but in short, your update did restore the ability to download when using credentials for me.

Just to be clear, I took your fix-auth branch, rebased it onto the current googleplay-api master (664c399), and ran gplaycli -d com.andrewshu.android.redditdonation (that's a paid app) which worked as expected. My config file contains:

[Credentials]
token=False
gmail_address=localpart@gmail.com
gmail_password=the-app-password

I should also mention that I don't understand what this branch was intended to fix, it's beyond me šŸ˜›, so I've no comment on whether or not it works... only that it's not breaking what little I tested.

lkeai2007 commented 4 years ago

helloļ¼Œcould you please tell me How to save gsfId and authSubToken

smfahadhassan commented 3 years ago

helloļ¼Œcould you please tell me How to save gsfId and authSubToken

api = GooglePlayAPI(locale="en_US", timezone="UTC") gsfId = api.gsfId authSubToken = api.authSubToken

print(gsfId) print(authSubToken)

thats how you can get your gsfId and authSubToken..

fahadakbar24 commented 2 years ago

The issue is still persisting even with this pull request, when listing apps under a category:

Traceback (most recent call last): File "-----------\googleplay-api\test\test.py", line 43, in catList = server.list(cat) File "-----------\googleplay-api\gpapi\googleplay.py", line 455, in list data = self.executeRequestApi2(path) File "-----------\googleplay-api\gpapi\googleplay.py", line 339, in executeRequestApi2 raise RequestError(message.commands.displayErrorMessage) gpapi.googleplay.RequestError: 'Error retrieving information from server. DF-DFERH-01'

LosevMikhail commented 2 years ago

@fahadakbar24 have u found any workarounds to fix list()? thx

fahadakbar24 commented 2 years ago

Enabling 2 Factor Authentication and using app specific password is working

@fahadakbar24 have u found any workarounds to fix list()? thx