[GH-ISSUE #207] Requesting authentication for Google Drive... Failed {'Error': 'BadAuthentication'} #183

Open
opened 2026-02-25 20:34:50 +03:00 by kerem · 11 comments
Owner

Originally created by @jacolamanna on GitHub (Oct 5, 2023).
Original GitHub issue: https://github.com/B16f00t/whapa/issues/207

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.

Originally created by @jacolamanna on GitHub (Oct 5, 2023). Original GitHub issue: https://github.com/B16f00t/whapa/issues/207 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.
Author
Owner

@gholker commented on GitHub (Oct 12, 2023):

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

<!-- gh-comment-id:1758774574 --> @gholker commented on GitHub (Oct 12, 2023): 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
Author
Owner

@aaronshenhao commented on GitHub (Dec 16, 2023):

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.

<!-- gh-comment-id:1858843217 --> @aaronshenhao commented on GitHub (Dec 16, 2023): 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.
Author
Owner

@southall01 commented on GitHub (Dec 18, 2023):

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!

<!-- gh-comment-id:1860519592 --> @southall01 commented on GitHub (Dec 18, 2023): > 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!
Author
Owner

@aaronshenhao commented on GitHub (Dec 20, 2023):

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.

<!-- gh-comment-id:1864415779 --> @aaronshenhao commented on GitHub (Dec 20, 2023): > > 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.
Author
Owner

@Sarmingsteiner commented on GitHub (Mar 9, 2024):

@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?

<!-- gh-comment-id:1986897849 --> @Sarmingsteiner commented on GitHub (Mar 9, 2024): @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?
Author
Owner

@aaronshenhao commented on GitHub (Mar 9, 2024):

@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:
@.***>

<!-- gh-comment-id:1986977238 --> @aaronshenhao commented on GitHub (Mar 9, 2024): @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: > ***@***.***> >
Author
Owner

@Sarmingsteiner commented on GitHub (Mar 10, 2024):

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

<!-- gh-comment-id:1987286577 --> @Sarmingsteiner commented on GitHub (Mar 10, 2024): 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
Author
Owner

@jddcef commented on GitHub (May 27, 2024):

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?

<!-- gh-comment-id:2134085147 --> @jddcef commented on GitHub (May 27, 2024): > 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)](https://github.com/YuriCosta/WhatsApp-GD-Extractor-Multithread/issues/47#issuecomment-1986946778) 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?
Author
Owner

@southall01 commented on GitHub (Sep 4, 2024):

still no go
{'Error': 'BadAuthentication'}

<!-- gh-comment-id:2329683915 --> @southall01 commented on GitHub (Sep 4, 2024): still no go {'Error': 'BadAuthentication'}
Author
Owner

@daferferso commented on GitHub (Sep 22, 2024):

@southall01
You can use this repository to download your WhatsApp backups from Google Drive:
https://github.com/daferferso/whatsapp-gdrive-extractor

<!-- gh-comment-id:2365427139 --> @daferferso commented on GitHub (Sep 22, 2024): @southall01 You can use this repository to download your WhatsApp backups from Google Drive: https://github.com/daferferso/whatsapp-gdrive-extractor
Author
Owner

@davispuh commented on GitHub (Dec 8, 2024):

It's really strange... Why this repo doesn't work? I've 2FA and set app password and got BadAuthentication but @daferferso repo worked perfectly fine without any issues.

<!-- gh-comment-id:2526281981 --> @davispuh commented on GitHub (Dec 8, 2024): It's really strange... Why this repo doesn't work? I've 2FA and set app password and got `BadAuthentication` but @daferferso repo worked perfectly fine without any issues.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/whapa#183
No description provided.