Closed LightYagami28 closed 5 months ago
Same here. BadAuthentication
getting same exact issue, seems like a malformation issue on gpsoauth
Anyway around it?
Found a pretty ugly workaround but it works.
gpsoauth
dependency as instructed, install it from this fork:
pip install git+https://github.com/kiwiz/gpsoauth@master
class WaBackup:
"""
Provide access to WhatsApp backups stored in Google drive.
"""
def __init__(self, gmail, password, android_id):
#token = gpsoauth.perform_master_login(gmail, password, android_id)
token = gpsoauth.exchange_token(gmail, "YOUR_TOKEN_HERE", android_id)
if "Token" not in token:
quit(token)
self.auth = gpsoauth.perform_oauth(
gmail,
token["Token"],
android_id,
oauth_token
cookie and replace YOUR_TOKEN_HERE
. The problem is that the normal login routine of gpsoauth
, using the gmail address and password, is not working, therefore we use the oauth token for login instead.
Thanks for posting a workaround - even if it takes making a token, this is useful. I can confirm I can download it all using that. I guess some automation can be done with selenium or something like that. But for now as a one-off backup that is helpful.
BTW - does anyone know how to decrypt and view the messages?
@guysoft I don't think it's really worth it to automate this procedure as a fix to the master_login is being worked on already. If you still have a running WhatsApp installation and can backup again, the easiest way is to enable end-to-end encryption then decrypt the data with your own key: link. If you must extract the copy you have on GDrive, you can try WhatsApp-Key-DB-Extractor.
The issue with the workaround is that after a while I get:
Http Error: 401 Client Error: Unauthorized for url: https://backup.googleapis.com/v1/clients/wa/backups/[number]/files
So I guess the token expires
@fei0316 did anyone say that there is effort to fix the master_login anywhere? Could not see any mention
@fei0316 did anyone say that there is effort to fix the master_login anywhere? Could not see any mention
You can check out this.
I'm using gpsoauth 1.0.2, everything works fine. BadAuthentication can be 2FA enabled on your account so you will need to get an app password from your google account.
My account does use 2FA but I am using the app password already. Though I think this issue is not related to this project at all but rather gpsoauth.
@fei0316 : You are my live safer, the only working solution I have found to get access to our Google Drive backup!
Only one thing has to be changed: pip install git+https://github.com/kiwiz/gpsoauth@master
is not available any more, but it works with Simon's version as well: pip install git+https://github.com/simon-weber/gpsoauth@master
Hello, if i double click on WhatsAppGDExtract is just open and closes....
@fei0316 : You are my live safer, the only working solution I have found to get access to our Google Drive backup!
Only one thing has to be changed:
pip install git+https://github.com/kiwiz/gpsoauth@master
is not available any more, but it works with Simon's version as well:pip install git+https://github.com/simon-weber/gpsoauth@master
I tried the following workaround, but keeps getting the following error. Any suggestions? Already tried 2FA with app password and also the actual email password with 2FA disabled.
File "D:\WhatsApp-GD-Extractor-Multithread-master\WhatsAppGDExtractRevised.py", line 258, in <module>
main(sys.argv)
File "D:\WhatsApp-GD-Extractor-Multithread-master\WhatsAppGDExtractRevised.py", line 207, in main
wa_backup = WaBackup(**getConfigs())
^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\WhatsApp-GD-Extractor-Multithread-master\WhatsAppGDExtractRevised.py", line 64, in __init__
token = gpsoauth.exchange_token(gmail, "oauth2_4/0AeaYSHDBw_SbkAavTf7T4P-OTKpCNMv1PO6dNAUZ5INodeOVj35LFwfuLes3m-xy6ZXXxxQ", android_id)
^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'gpsoauth' has no attribute 'exchange_token'
I'm getting this; AttributeError: module 'gpsoauth' has no attribute 'exchange_token'
I don't know why this thread is still getting so many comments, some even with unrelated problems. I just tried it again with my personal account from scratch.
Worked flawlessly with my 2FA account here.
I don’t know what is the problem i set the settings.cfg perfect.
Pls help