Method:/user/createExample 1:
To create a new user, we must specify the name of the user and its parent: either a domain or a unit. On success, the method always returns the internal user id of the newly created user.
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
{
"attrs":
[
"product {
"domain.id": "pidparent domain id",
"user.id "loginName": "useridthe login name",
"pin "password": "tokenpin"
]
} |
| Code Block |
|---|
|
{
"error":0,
"result":
{
"idthe password",
"email": "tokenid1"
}
} |
Example 2:
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
{
"attrs":
[
"product":
{
"manufacturerCode":"DN",
"productCode":"MT"
},
"user":
{
"domain.name":"domain.com",
"loginNam":"john.smith"
}
"pin": "tokenpin"
]
the email",
...
}
} |
| Code Block |
|---|
|
{
"error":0,
"result":
{
"id": "tokenid1"
"the id of the newly created user"}
} |