B16f00t / whapa

WhatsApp Parser Toolset v1.59
1.09k stars 258 forks source link

Requesting authentication for Google Drive... Failed {'Error': 'BadAuthentication'} #207

Open jacolamanna opened 9 months ago

jacolamanna commented 9 months ago

I still get the Bad authentication error, no matter the OS or python version or gauth version. I tried python 3.11, 3.9.18, gauth git commit b22c57a but also the latest I tested both linux and osx, the latter with both python versions using pyenv (tcl/tk with brew) and python-tk / python-11 with homebrew.

I tried with all authentication methods (2FA on or off, app password or account password, password input or in the settings file...) I also obtained an oauth token for a custom app with a custom script, wrote the token in the settings, whapa still produces the badauth error and deletes the oauth string from the settings file.

gholker commented 9 months ago

I had some luck with this: https://github.com/simon-weber/gpsoauth/issues/48#issuecomment-1690340572

I got authenticated but the response was empty. Still trying to figure it out.

This is my version of the docker file: https://gist.github.com/gholker/80a8b028eb02f99db9aa7fa843d97d74

aaronshenhao commented 7 months ago

I'm still having the same problem. I got it to work with https://github.com/limontec/WhatsApp-GDrive-Downloader, which uses an older fork of this project (and perhaps an older version of gpsoauth too). The users of gpsoauth still appear to be having the issues, despite the latest commit.

I don't know why it works with that fork. It could be that Google's own Collab servers are less likely to go through checks, or it could be something about the older code and its dependencies (that could probably be checked by running the code locally and seeing if it still works). I'm not using 2FA.

southall01 commented 7 months ago

I'm still having the same problem. I got it to work with https://github.com/limontec/WhatsApp-GDrive-Downloader, which uses an older fork of this project (and perhaps an older version of gpsoauth too). The users of gpsoauth still appear to be having the issues, despite the latest commit.

I don't know why it works with that fork. It could be that Google's own Collab servers are less likely to go through checks, or it could be something about the older code and its dependencies (that could probably be checked by running the code locally and seeing if it still works). I'm not using 2FA.

Thanks din't not work for me ..get cannot stat '/content/00351xxxxxx/files/whatsapp_backup_00351xxxxxxx.zip': No such file or directory File not found!

aaronshenhao commented 7 months ago

I'm still having the same problem. I got it to work with https://github.com/limontec/WhatsApp-GDrive-Downloader, which uses an older fork of this project (and perhaps an older version of gpsoauth too). The users of gpsoauth still appear to be having the issues, despite the latest commit. I don't know why it works with that fork. It could be that Google's own Collab servers are less likely to go through checks, or it could be something about the older code and its dependencies (that could probably be checked by running the code locally and seeing if it still works). I'm not using 2FA.

Thanks din't not work for me ..get cannot stat '/content/00351xxxxxx/files/whatsapp_backup_00351xxxxxxx.zip': No such file or directory File not found!

It's an issue with the code (if you want to export, write the code yourself or mount your Google Drive account and copy it over manually). You should be able to see the downloaded files under /content. If you reached that part without an error message in the previous part, it means that the authentication was successful. To verify this, check that it has shown your info correctly (without download_all selected). If it shows your info, it must have connected to Google Drive.

As an interesting side note, I discovered that some images are missing, when compared to another device that I have transferred my Whatsapp account to, despite it also using Google Drive to download old messages. For example, when I get the image files from the media file in Internal Storage of the new device, I get ~2000 images, but I only get ~400 after using this method.

Sarmingsteiner commented 4 months ago

@aaronshenhao

or mount your Google Drive account

Do you have any idea where / how to mount a Google Drive account so that the WhatsApp backups are visible & accessible?

aaronshenhao commented 4 months ago

@Sarmingsteiner

The mounting process is for exporting the data into your Google Drive account once it has been downloaded. To access the backup itself, I used to code from that Colab link, although the code itself needs some fixing (not my code).

The most reliable way I found so far doesn't actually use Whapa. If the Whatsapp account is active, then the best way is to log into Whatsapp on a rooted Android version, and to extract the files manually. If you don't want to root your phone, this can be done by using the Android emulator Bluestacks (there's a tutorial on how to root it; it just involves modifying a text file).

If the Whatsapp account is no longer active, then the best way is to use a hack where the phone is connected via ADB, and Whasapp is replaced with an older version. The older version of Whataspp has lax permissions, so it is actually possible to use ADB to extract out the portion that could only be extracted using a rooted OS. There's a project on Github for this, but I can't find it right now.

On Sun, Mar 10, 2024 at 3:02 AM Sarmingsteiner @.***> wrote:

@aaronshenhao https://github.com/aaronshenhao

or mount your Google Drive account

Do you have any idea where / how to mount a Google Drive account so that the WhatsApp backups are visible & accessible?

— Reply to this email directly, view it on GitHub https://github.com/B16f00t/whapa/issues/207#issuecomment-1986897849, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQRUT2KVMWPWH5T7F43RRMLYXMXBPAVCNFSM6AAAAAA5URXR22VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWHA4TOOBUHE . You are receiving this because you were mentioned.Message ID: @.***>

Sarmingsteiner commented 4 months ago

Thanks @aaronshenhao, I finally found a working solution to get access to / download the WA backup from Google Drive: https://github.com/YuriCosta/WhatsApp-GD-Extractor-Multithread/issues/47#issuecomment-1986946778

jddcef commented 1 month ago

Thanks @aaronshenhao, I finally found a working solution to get access to / download the WA backup from Google Drive: YuriCosta/WhatsApp-GD-Extractor-Multithread#47 (comment)

Doesn't seem to help here. Maybe the android_id isn't optional? What paramaters do you set in your cfg?

I notice in the latest version of gpsoauth there is a exchange_token method described in their latest README. They said it was to solve bad_authentication issues. Could whapa not incorporate that method perhaps?