This is the ThingsDB documentation for version v0, click here for the latest version!
Creates a new user to ThingsDB. The new user is created without a password, token and access privileges. You probably want to set a password or add a new token, and assign some privileges using grant(…).
This function requires GRANT privileges on the @thingsdb scope.
This function generates an event.
new_user(user)
| Argument | Type | Description |
|---|---|---|
user |
str (required) | Username, between 1 and 128 graphical characters. |
Returns the new user id if successful. A lookup_err() is raised
if the user already exists.
Create a new user
iris:
new_user('iris');
Example return value in JSON format (the new user id)
19