
π Quickstart#
Welcome to the Olvid botsβ documentation!
We have designed this set of tools to allow you to create your own chatbots and integrations for the Olvid application, while maintaining its maximum security standards.
We recommend that you start with our Installation procedure. It will allow you to install and configure your own Olvid daemon. This daemon can be seen as an Olvid application controllable through a gRPC API.
Once the installation is complete, you will be able to start writing the code for your first clients, in order to interact and control the Olvid profile that you will have created on the daemon.
Note
This documentation is still being written. If something seems incorrect, poorly written or unclear to you, you can:
create an issue and/or open a pull request by clicking on the available GitHub button in the top bar.
contact us by email : bot@olvid.io
Installation#
Prerequisites#
To follow this procedure, you will need to have Docker installed on your computer. The installation procedure is available here: Install Docker.
Infrastructure#
We will use a Docker Compose file to configure and launch our infrastructure.
You can copy the following content into a file named docker-compose.yaml
.
services:
daemon:
image: olvid/bot-daemon
environment:
- OLVID_ADMIN_CLIENT_KEY_CLI=SetARandomValue
ports:
- 50051:50051
volumes:
- ./data:/daemon/data
cli:
image: olvid/bot-python-runner
entrypoint: "olvid-cli"
environment:
- OLVID_ADMIN_CLIENT_KEY=SetARandomValue
- OLVID_DAEMON_TARGET=daemon:50051
stdin_open: true
tty: true
profiles: ["cli"]
We will now launch the daemon in background with the following command:
docker compose up -d
To check that the daemon has started correctly, we can look at its logs.
docker compose logs -f daemon
Once the logs have finished scrolling, the daemon has started and you can exit the display using CTRL + C.
Olvid Identity#
The command-line interface (CLI) of Olvid allows for direct connection to the daemon and manually sending commands. At a minimum, it is used to create our Olvid identity and establish contact with it. However, it can also be useful in the future for debugging programs or triggering manual actions.
To launch the CLI in interactive mode, use the following command:
docker compose run --rm cli
A new prompt now appears. The number displayed corresponds to the identifier of the currently used identity. In our case, it displays 0 because we do not yet have an identity on the daemon. For more information, visit the CLI section.
To create our first identity, we will use the command identity new
. Here is a complete and commented example of how this command works.
# Create a new identity. Replace FirstName, LastName, ... with expected values
# LastName, Position and Company are optionals and these details can be updated later.
0 > identity new FirstName LastName Position Company
# A client key to connect to daemon is automatically created
# Save it somewhere, you will need it to write your bots.
identity creation > Here is your client key to connect to daemon with this identity:
AAAAAAAA-BBBB-AAAA-AAAA-AAAAAAAAAAAA
# Enter "yes" to validate that you saved your client key
identity creation > Did you saved your client key ? (y/N)
# Enter "yes" to get in touch with this new identity with your personal identity in Olvid.
# This step is optional but necessary if you want to create a discussion with your bot.
identity creation > Do you want to add this identity to your contacts ? (y/N)
>yes
# This is your Bot invitation link
# You can open it in you web browser to show the QR to scan with your mobile application
# You can also copy it to import it in your desktop client.
identity creation > Send an invitation to this invitation link: https://invitation.olvid.io/#........
# The CLI is now waiting for your invitation to arrive
# When your invitation arrive process restarts
identity creation > Please enter sas code displayed on the other device
# Enter 4 digits code shown in your Olvid Application
> 0000
# Enter code shown in your Olvid Application
identity creation > Please enter this sas code on the other device: 1111
# Process is now finished
Now using identity: 1
You can now send messages to YOUR NAME in discussion 1
# You can send a test message with this command
1 > message send 1 Hello World !
# to leave interactive mode use CTRL + D or exit command
1 > exit
First Program#
You now have a functional infrastructure with a daemon hosting an Olvid identity. You can use the daemonβs gRPC API to control this identity.
To continue, you need to choose the technology you want to use to write your first bot.
Currently, the following languages are available: