WhatsApp-GD-Extractor icon indicating copy to clipboard operation
WhatsApp-GD-Extractor copied to clipboard

Error= BadAuthentication

Open santigracia opened this issue 7 years ago • 52 comments

Not working with correct credentials. Error= BadAuthentication

santigracia avatar Jul 10 '17 00:07 santigracia

Not working with correct credentials. Error= BadAuthentication

pavuram avatar Jul 14 '17 14:07 pavuram

same for me , Error= BadAuthentication

haitamkh avatar Jul 14 '17 17:07 haitamkh

talking on https://forum.xda-developers.com/android/apps-games/tool-whatsapp-google-drive-extractor-t3483633/page4

v4l3r10 avatar Jul 15 '17 16:07 v4l3r10

Throws no error but finds no files...

#https://developers.google.com/drive/v3/web/appdata
from __future__ import print_function
import os
from httplib2 import Http
from apiclient import discovery
from oauth2client.client import OAuth2WebServerFlow
from oauth2client.tools import run_flow
from oauth2client.file import Storage

CLIENT_ID = ''
CLIENT_SECRET = ''

def get_credentials():
   storage = Storage('creds.data')
   credentials = storage.get()
   if not credentials or credentials.invalid:
      flow = OAuth2WebServerFlow(client_id=CLIENT_ID, client_secret=CLIENT_SECRET, scope='https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive.appdata', redirect_uri='http://example.com/auth_return')
      credentials = run_flow(flow, storage)
   return credentials

def main():
   creds = get_credentials()
   http = creds.authorize(Http())
   drive_service = discovery.build('drive', 'v3', http=http)
	
   results = drive_service.files().list(spaces='appDataFolder', fields='nextPageToken, files(id, name)', pageSize=10).execute()
   print(results)
   items = results.get('files', [])
   print(results.get('nextPageToken'))
   if not items:
      print('No files found.')
   else:
      print('Files:')
      for item in items:
          print('{0} ({1})'.format(item['name'], item['id']))
          #download_file(service,item['id'],item['name'])

if __name__ == '__main__':
    main()

0xBADEAFFE avatar Jul 15 '17 20:07 0xBADEAFFE

@EliteAndroidApps Maybe you can help us?

0xBADEAFFE avatar Jul 18 '17 09:07 0xBADEAFFE

The same problem, maybe Google Server block

alvaro354 avatar Jul 26 '17 11:07 alvaro354

So, here how to get it to work again :

  • I used python 3 (probably irrelevant).
  • download https://github.com/rckclmbr/pyportify ("Clone or download" button) credits to rckclmbr
  • copy the folder "pyportify" to the same folder "WhatsAppGDExtract.py" from TripCode is.
  • Use my modified WhatsAppGDExtract.py -> https://pastebin.com/TbWuDcGp

By bkteria

https://forum.xda-developers.com/android/apps-games/tool-whatsapp-google-drive-extractor-t3483633/page5

alvaro354 avatar Jul 26 '17 11:07 alvaro354

It has been fixed 6 days ago but the main branch didn't get the new code. Go to Pull Requests, click on fix Bad Authentication error, click on fix Bad authentication error OR CLICK HERE b31ab49, then View button (View the whole file), download the Raw file and replace old one. You'll need to install dependencies shown in import. AFAIK this won't work with 2.7 as pyportify doesn't support it anymore... or at least it doesn't on my machine. Once done it will work without errors anymore. I've also made a repository with the changes: https://github.com/ViperCode7/WhatsApp-GD-Extractor

ViperCode7 avatar Jul 26 '17 14:07 ViperCode7

  • I used python 2.7

  • https://github.com/EliteAndroidApps/WhatsApp-GD-Extractor/blob/b31ab493d9831223403c65c7e3d90501049a758c/WhatsAppGDExtract.py use this code

  • download https://github.com/rckclmbr/pyportify ("Clone or download" button)

  • after download keep the pyportify at the same location were WhatsAppGDExtract.py then open the pyportify/gpsoauth/util.py and change int.from_bytes(s, "big") to int(str(s).encode('hex'), 16)

chavanrohan111 avatar Nov 25 '17 13:11 chavanrohan111

@chavanrohan111 I am following your instructions. Still getting Error = Bad Authentication. Can you tell me how i can make it a successful pull of the file?

zeecitizen avatar Nov 27 '17 14:11 zeecitizen

same error, pls help..

kingRanit avatar Dec 15 '17 10:12 kingRanit

Hi, first replace with this WhatsAppGDExtract.py file and in the next step use the url: https://accounts.google.com/b/0/DisplayUnlockCaptcha for unlock the access to the account. Good Luck!!

WhatsAppGDExtract.zip

cabasol avatar Dec 29 '17 16:12 cabasol

Traceback (most recent call last): File "WhatsAppGDExtract.py", line 203, in main() File "WhatsAppGDExtract.py", line 184, in main runMain('info', 'settings', 0) File "WhatsAppGDExtract.py", line 135, in runMain drives = gDriveFileMap() File "WhatsAppGDExtract.py", line 62, in gDriveFileMap for result in jres['items']: KeyError: 'items'

chinodiaz avatar May 17 '18 04:05 chinodiaz

@chinodiaz hi did you manage to do it to the end? i have this error too.

fiorins avatar May 26 '18 16:05 fiorins

Hi Anyone know if this is working? If so can you please help me with the script that needs to be used?

rakeshkc1988 avatar Jun 05 '18 18:06 rakeshkc1988

@rakeshkc1988 @EliteAndroidApps hi everyone i solved using an extractor where in the script "settings" is present phone number field. NB: when you write phone number remember to write first the country code (e.g. 39 for Italy). With this method it works. greetings to all

fiorins avatar Jun 05 '18 19:06 fiorins

Hi itsgrrove,

Did you mean to add ph number in settings.cfg file?

rakeshkc1988 avatar Jun 05 '18 20:06 rakeshkc1988

@rakeshkc1988 not you, on the web there are extractor in which settings.cfg file have also cellphn no field. download extractor from this link and follow the same procedure. https://forum.xda-developers.com/showpost.php?p=76346988&postcount=180 Remember with country code like 926576787867

fiorins avatar Jun 06 '18 09:06 fiorins

@itsgroove Still gives Error=BadAuthentication.. Do you know if we have to do anything in google console to allow authenticated requests or add a project in console.developers.google.com for example. This is really important for me to have the database and i appreciate your help. Do we have to modify the python script before running it. For example getGoogleAccountTokenFromAuth() function has field b64_key_7_3_29. Maybe this field means we need to generate the token somewhere?

zeecitizen avatar Jun 06 '18 10:06 zeecitizen

@zeecitizen i'n not at home these days, i return this saturday, i'll help you, see you soon.

fiorins avatar Jun 07 '18 22:06 fiorins

You know that there is a working fork? https://github.com/YuriCosta/WhatsApp-GD-Extractor-Multithread

dadosch avatar Jun 18 '18 17:06 dadosch

@dadosch Hey! I've just tried that fork but I'm getting this error "The "settings.cfg" file is missing or corrupt!". Only fill gmail, passw and celnumbr field.

nico-dela avatar Jun 18 '18 20:06 nico-dela

Try to use a app-password generated by google. Make sure to put the phone number without + or leading 0's in. For the device ID, look after "device ID" in the play store, there are many apps to show you yours. Also make sure that the cfg file is in the same folder AS the Python script

dadosch avatar Jun 18 '18 21:06 dadosch

It worked! but I'm getting this new message: "Unable to locate google drive file map for: com.whatsapp ".

nico-dela avatar Jun 18 '18 21:06 nico-dela

Then it is probably not the same google account as you used when backing up WhatsApp. You can make an instant backup in WhatsApp's settings. There you might also see your email

dadosch avatar Jun 18 '18 21:06 dadosch

@rakeshkc1988 not you, on the web there are extractor in which settings.cfg file have also cellphn no field. download extractor from this link and follow the same procedure. https://forum.xda-developers.com/showpost.php?p=76346988&postcount=180 Remember with country code like 926576787867

It Really works using this link

felipealvesgnu avatar Oct 09 '18 17:10 felipealvesgnu

Hi martin,

you have to follow this link: http://www.techpanther.in/2017/09/how-to-extract-whatsapp-database-from.html

and after that add one more information to your settings.cfg like celnumbr field like below:

[auth] gmail = [email protected] passw = mypwd devid = 1B69D7B089AA28730 # I got this number using called Device ID (don't forget to delete this comment) celnumbr = 5565837386474 # your number with country code (don't forget to delete this comment)

[app] pkg = com.whatsapp sig = 38a0f7d505fe18fec64fbf343ecaaaf310dbd799

[client] pkg = com.google.android.gms sig = 38918a453d07199354f8b19af05ec6562ced5788 ver = 9877000

Em qua, 10 de out de 2018 às 12:11, martinfgodoy [email protected] escreveu:

@felipealves-gnu https://github.com/felipealves-gnu I try with your link. The error of BadAuthentication has disappeared. But when I do the query I do (-list -info, etc) it returns this:

File "WhatsAppGDExtract.py", line 214, in main() File "WhatsAppGDExtract.py", line 197, in main runMain('list', 'all', 0) File "WhatsAppGDExtract.py", line 146, in runMain drives = gDriveFileMap() File "WhatsAppGDExtract.py", line 72, in gDriveFileMap for result in jres['items']: KeyError: 'items'

Can you help me, please? Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/EliteAndroidApps/WhatsApp-GD-Extractor/issues/6#issuecomment-428633956, or mute the thread https://github.com/notifications/unsubscribe-auth/AAwwz_KbdZuwQvJpXMQNpvuc520yz_zfks5ujhwtgaJpZM4OSO7X .

felipealvesgnu avatar Oct 10 '18 16:10 felipealvesgnu

Lo siento, olvidé copiar y pegar el archivo settings.cfg a continuación: [auth] gmail = [email protected] passw = mypwd devid = 1B69D7B089AA2F90 # Obtuve este número utilizando el ID de dispositivo llamado (no olvide eliminar este comentario ) celnumbr = 556599226474 # su número con código de país (no se olvide de eliminar este comentario) [app] pkg = com.whatsapp sig = 38a0f7d505fe18fec64fbf343ecaaaf3 fauces de las partes de las partes de la reunión: qua, 10 de out de 2018 às 12:11, martinfgodoy [email protected] escreveu: ... @felipealves-gnu https://github.com/felipealves-gnu I try with your link. The error of BadAuthentication has disappeared. But when I do the query I do (-list -info, etc) it returns this: File "WhatsAppGDExtract.py", line 214, in main() File "WhatsAppGDExtract.py", line 197, in main runMain('list', 'all', 0) File "WhatsAppGDExtract.py", line 146, in runMain drives = gDriveFileMap() File "WhatsAppGDExtract.py", line 72, in gDriveFileMap for result in jres['items']: KeyError: 'items' Can you help me, please? Thanks! — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#6 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAwwz_KbdZuwQvJpXMQNpvuc520yz_zfks5ujhwtgaJpZM4OSO7X .

@felipealves-gnu olá felipe Eu li seus comentários Gostaria de saber se você já resolveu esse problema? Eu gostaria que você me ajudasse a esclarecer se você tem tempo de cumprimentos da Colômbia

ANTONY3131 avatar Oct 11 '18 02:10 ANTONY3131

Thanks @felipealves-gnu , Thanks @ANTONY3131 ; I was able to skip the "BadAuthentication" error, but now the error "Unable to locate google drive file map for: com.whatsapp" appears. I have searched for some info, but I could not solve it. Any ideas? Thank you!

martinfgodoy avatar Oct 11 '18 04:10 martinfgodoy

@ANTONY3131 I did't have the same error as you. I ran using python3, try in this way: python3 WhatsAppGDExtract.py -list

felipealvesgnu avatar Oct 11 '18 15:10 felipealvesgnu