đļCreating Users
This step shows how to create Groups users via GroupsAPI
Below is a list of available parameters when creating a user.
Parameter
Type
Required
Default
Description
name
string
Yes
n/a
Name of the user
surname
string
Yes
n/a
Surname of the user
string
Yes
n/a
Email of the user
username
string
Yes
n/a
Username of the user
psd
string
No
null
Password of the user
mobile
string
No
null
Mobile of the user
login_allowed
bool
No
true
Flag if the login is allowed
active
bool
No
true
Flag if the user is active
lang
string
No
tr-TR
Language of the user(see). This option modifies: session interface, panel interface and mails.
timezone
string
No
Europe/Istanbul
Timezone of the user(see) This option modifies: how the user sees sessions' hours.
Example payload:
curl --location 'https://<DOMAIN>/xapi/user' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"name": "John",
"surname": "Doe",
"username": "johndoe",
"email": "john@doe.com",
"role": "u"
}'from perculus_sdk.client import APIClient
# API client
client = APIClient()
...
# Create user
user = client.users.create_user({
"name": "<USER_NAME>",
"surname": "<USER_SURNAME>",
"username": "<USERNAME>",
"email": "<USER_EMAIL>",
"role": "<USER_ROLE>"
})
print(user)Example response:
Last updated