2024-08-24 22:54:58 +00:00
|
|
|
# fetch-matrix-access-token
|
|
|
|
## Why
|
|
|
|
The access token from Element can not be used for a different app (it seems).
|
|
|
|
With this simple script you can retrieve the access token and then use it for a different app since this script won't create any encryption.
|
|
|
|
|
|
|
|
## Requirements
|
|
|
|
* The matrix server, where the account is located, needs password-login enabled
|
2024-08-24 22:56:30 +00:00
|
|
|
* local environment requires `nodejs`, `yarn` and `nvm`
|
2024-08-24 22:54:58 +00:00
|
|
|
|
|
|
|
## Installation & setup
|
|
|
|
* `yarn install`
|
|
|
|
* `nvm use`
|
2024-08-24 22:56:30 +00:00
|
|
|
* `cp config.js.example config.js`
|
2024-08-24 22:54:58 +00:00
|
|
|
* edit the `config.js`
|
|
|
|
|
|
|
|
## Fetching the key
|
|
|
|
* `yarn start`
|
2024-08-24 22:56:30 +00:00
|
|
|
* The script will print the access token.
|
2024-08-24 22:54:58 +00:00
|
|
|
|
|
|
|
## Credits
|
|
|
|
This script is based on snippets from the documentation of [matrix-bot-sdk](https://github.com/turt2live/matrix-bot-sdk)
|