Creating a matrix nio chat bot

A matrix chat bot can be programmed with matrix-nio.

Examples for matrix chat bots can be found here: matrix-nio-basic-client (Basic not encrypted chat functionality) jeremiah-k-understanding-nio (Encrypted chat bot template)

End to end encryption

To enable end to end encryption for the matrix-nio chat bot the C library libolm has to be installed.

apt install libolm-dev

Matrix-nio has to be installed with the following option:

pip install matrix-nio[e2e]

When creating new chat bots that implement end to end encryption for a existing matrix user account they have to be verified by one of the other verified user devices (e.g. a element client) or else a warning message will be shown to a communication partners that has an encrypted chat conversation with the unverified chat bot.

Verification can be achieved by

See also the following bugs: matrix-nio-device-verification-bug matrix-nio-no-such-room-with-id