TypeDB 3.0 is live! Get started for free.

Creating users

To create a new user, connect to TypeDB and follow the steps below:

  • Console

  • Studio

Run the following command:

user create <username>

Where <username> is the name of the user.

You will be prompted for a password.

Coming soon.

To create a new user programmatically:

  • Rust

  • Python

  • Java

  • Node.js

  • C#

  • C++

  • C

  • HTTP

let result = driver.users().create("<username>", "<password>").await;

Where driver is an instance of a driver, connected to TypeDB, "<username>" is the name of the user, and "<password>" is its password.

driver.users.create("<username>", "<password>")

Where driver is an instance of a driver, connected to TypeDB, "<username>" is the name of the user, and "<password>" is its password.

driver.users().create("<username>", "<password>");

Where driver is an instance of a driver, connected to TypeDB, "<username>" is the name of the user, and "<password>" is its password.

Coming soon.

Send a users POST HTTP request:

curl
curl --request POST \
  --url {http/https}://{address}:{http_port}/v1/users/<username> \
  --header 'Authorization: Bearer {ACCESS-TOKEN}' \
  --json '{"password": "<password>"}'

Where {ACCESS_TOKEN} is your authentication token, <username> is the name of the user, and "<password>" is its password.