Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

WhatsApp Import

Open Dischi opened this issue 12 years ago • 50 comments

Similar to SMS import it would be nice to have a WhatApp import. I (like others) used WhatApp and would like to keep my old chat history. I have no idea how to get the data from WhatsApp but there are many tools at the Play Store with such a feature, maybe one is open source, too.

Dischi avatar Mar 04 '14 15:03 Dischi

On Android, WhatsApp supports writing a database backup to the shared storage. The backup contains all messages in an sqlite file "encrypted" by an AES key which is hardcoded into the application...

This is of course ridiculous from a security point of view (not unlike using the same RC4 keystream in both directions), but including that key in TextSecure might cause legal problems for this project.

lxgr avatar Mar 04 '14 16:03 lxgr

I agree, that could cause problems. Too bad they encrypt it since the encryption is useless. WhatsApp supports sending a chat via mail. It would be some extra steps, but maybe import that mail somehow?

Dischi avatar Mar 04 '14 16:03 Dischi

I don't think we can do this.

moxie0 avatar Mar 04 '14 17:03 moxie0

I thik we can do slightly different approach. What's app allows exporting chat in txt from https://faq.whatsapp.com/android/chats/how-to-save-your-chat-history/?lang=en

It looks like this

dd.mm.yyyy, HH:MM - Author: text

e.g.:

21.12.2019, 14:00 - John Doe: OK 😃

Using this approach we should be able to easily migrate chats.

janisz avatar Jan 07 '21 15:01 janisz

Doing it this way would lead to a loss of the included media, but the feature would help a lot of people to get rid of whatsapp and in the end it is better than nothing.

michi7801 avatar Jan 08 '21 11:01 michi7801

A lot has changed since 2014: Backups are now encrypted with a per-account key that's supplied by WhatsApp servers after recovering an account as far as I know

On the other hand, there is now GDPR and other legal provisions for the right to export your own data in some form in many countries. I don't know how applicable this is to client-side data, though.

Maybe it helps that at least in Germany, chat to HTML export is no longer available (for patent reasons), so potentially WhatsApp could be required to offer another, maybe more machine-readable export format?

lxgr avatar Jan 08 '21 11:01 lxgr

At least for me and I am living in Austria, WhatsApp has a export feature which gives you a plain .txt file which is formatted like a log file.

The format is like: [date] User: message

michi7801 avatar Jan 08 '21 13:01 michi7801

This feature is unavailable in Germany due to patent concerns:

https://www.teltarif.de/whatsapp-chat-exportieren-iphone/news/79156.html (article in German)

lxgr avatar Jan 08 '21 13:01 lxgr

Ok, pretty weird. At least here in Austria (and I suppose in Switzerland too?) this feature is still available. Anyway, as you already state (according to the GDPR) somehow WhatsApp must supplier you with the data they store about you and this is clearly the case with your whole chat history.

Edit: The article also states that this is only the case in Germany due to "national regulations"

michi7801 avatar Jan 08 '21 13:01 michi7801

I created community feature request

janisz avatar Jan 08 '21 14:01 janisz

I would strongly upvote for this feature. I used whatsapp exclusively for everything and would like to switch to signal. But wanna shift all my msgs and groups to the new platform too. Its not just me, everyone who is planning to migrate to signal will be pleased to have this. If you enable this, you can assure that signal would surpass WhatsApp in usage.

crisdeodates avatar Jan 08 '21 15:01 crisdeodates

That would be amazing. It's one of the reasons which prevents me to switch completely to Signal.

ghost avatar Jan 08 '21 16:01 ghost

somehow WhatsApp must supplier you with the data they store about you and this is clearly the case with your whole chat history.

Does WhatApp permanently keep any message data on their servers, or are messages removed once downloaded by the client(s) (remember that chat backups are performed via Google Drive/iCloud, not through some WhatApp-operated service)? If so, I'm not sure whether GDPR applies in the usual fashion.

(I'm on the same page with all of you: There should be a way to export full chat data.)

doersino avatar Jan 08 '21 16:01 doersino

@doersino Quoting their privacy policy:

If a message cannot be delivered immediately (for example, if you are offline), we may keep it on our servers for up to 30 days as we try to deliver it. If a message is still undelivered after 30 days, we delete it.

icyphox avatar Jan 08 '21 16:01 icyphox

At least on iOS it is possible to extract WhatsApp Chats with media. There is a Software called iMazing and it can extract WhatsApp Chats to CSV, Excel, TXT, PDF including:

  • Group events (who joined and who left a group and when)
  • Message status: sent, delivered, read, deleted
  • Contact, location and link sharing
  • All types of attachments: photos, videos, audio and files Source: https://imazing.com/print-and-export-iphone-whatsapp-chats

Marioheld avatar Jan 08 '21 16:01 Marioheld

somehow WhatsApp must supplier you with the data they store about you and this is clearly the case with your whole chat history.

Does WhatApp permanently keep any message data on their servers, or are messages removed once downloaded by the client(s) (remember that chat backups are performed via Google Drive/iCloud, not through some WhatApp-operated service)? If so, I'm not sure whether GDPR applies in the usual fashion.

(I'm on the same page with all of you: There should be a way to export full chat data.)

This is interesting. If you consider their web application, it should be retrieving the data from their web servers right? Plz let me know if I am wrong. So there should be some kind of msg storage available in their servers. Even we can go to old message history as far as it allows.

crisdeodates avatar Jan 08 '21 16:01 crisdeodates

This is interesting. If you consider their web application, it should be retrieving the data from their web servers right? Plz let me know if I am wrong. So there should be some kind of msg storage available in their servers. Even we can go to old message history as far as it allows.

Web app retrieves messages from the phone, not the servers. At least in theory.

madrian-es avatar Jan 08 '21 16:01 madrian-es

Okay, found the issue in HN, I tried to do something similar a while ago, my idea was to offer something like a SAAS CRM using Whatsapp, due to it's huge user base.

https://github.com/giovanialtelino/WhatsappMonitor

But it's pretty much impossible to officialy backup all your stuff, groups and chats are limited to 40k messages, more than that it will be lost. Your rich media (images, audios, videos) have no official position, only date. You can only backup one chat/group per time (no backup everything choice). Your .txt backup has different date time format, it will consider your location, for example here in Brazil it's "dd/MM/yyyy HH:mm".

The main issue is lost message, and the need to backup every single chat, I personally have more than 100 chats, so a lot would be lost... There are unnoficial tools like this one (https://github.com/B16f00t/whapa) that allow you to access your backup archive in the cloud and extract it, but at least for what I wanted to do it wasn't good enough, since it wasn't a official tool, but maybe it can help you guys.

giovanialtelino avatar Jan 08 '21 17:01 giovanialtelino

Does WhatApp permanently keep any message data on their servers, or are messages removed once downloaded by the client(s) (remember that chat backups are performed via Google Drive/iCloud, not through some WhatApp-operated service)? If so, I'm not sure whether GDPR applies in the usual fashion.

So if I am correct, Whatsapp stores a key for your data, which itself is in the iCloud or Google Drive. So according to the GDPR Whatsapp must supply the key to me if i asked them to, because it is data which is related to me, isn't it?

michi7801 avatar Jan 08 '21 17:01 michi7801

I installed Whatsapp Business to have a autoresponder. I also completely disabled Notifications afterwards. So for a migration period everyone who writes me in whatsapp gets a small text where to find me. (Signal)

nhh avatar Jan 08 '21 17:01 nhh