This project retrieves a full chat history (messages and uploaded files) and renders it as an HTML.
The maintainer does no longer have the need for this tool, nor can't find the time to keep it alive. Therefore this repository is set to read-only. If anyone is willing to maintain this utility, feel free to fork this repository.
Node.js 10 (or higher). Tested on macOS and Windows, but will most likely run on Linux too.
Like any other JS project, clone this repo and run the following command to install dependencies:
npm install
To backup a chat, run:
npm run start
This will ask several questions:
Chat ID - this is the identifier of the conversation. To find it:
19:<uuid of one user>-<uuid of other user>@unq.gbl.spaces
Auth token (JWT) - this is needed for calling Microsoft Graph APIs.
Chat.Read
and re-login (like it states).#access_token=<long token goes here>
). Copy this value. Or make any random call in the sandbox and copy the Authorization request header either from the JS console (without Bearer
in front of it) or from the "Access token" tab of the Graph Explorer page.Target directory name - is the name to use for the export (will be created in the out
directory in this project).
An exported chat contains:
messages-#####.json
: these are the pages of messages. Page 0000 is the most recent one (pages and messages within are in reverse order).image-#####
: these are images uploaded in the chatindex.html
: is the full history rendered into a simple HTML template, referring to the downloaded images. This is the file you want for viewing.