Fetch the matrix access token of an account. The access token can then be used for another app to run a bot.
Find a file
2024-08-25 00:56:30 +02:00
.gitignore Add gitignore 2024-08-25 00:36:56 +02:00
.nvmrc Add nvmrc 2024-08-25 00:42:54 +02:00
config.js.example Add config.js.example 2024-08-25 00:45:37 +02:00
main.js Add main.js 2024-08-25 00:45:45 +02:00
package.json Add package.json and yarn.lock 2024-08-25 00:45:18 +02:00
README.md Update README 2024-08-25 00:56:30 +02:00
yarn.lock Add package.json and yarn.lock 2024-08-25 00:45:18 +02: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
  • local environment requires nodejs, yarn and nvm

Installation & setup

  • yarn install
  • nvm use
  • cp config.js.example config.js
  • edit the config.js

Fetching the key

  • yarn start
  • The script will print the access token.

Credits

This script is based on snippets from the documentation of matrix-bot-sdk