Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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
languagejs
titleParameters
{
	    "attrs":
	[
		"product     {
          "domain.id": "pidparent domain id",
		"user.id          "loginName": "useridthe login name",
		"pin          "password": "tokenpin"
	]
}
Code Block
languagejs
titleResponse
{
	"error":0,
	"result":
	{
		"idthe password",
          "email": "tokenid1" 
	}
}

Example 2:

Code Block
languagejs
titleParameters
{
	"attrs":
	[
		"product":
		{
			"manufacturerCode":"DN",
			"productCode":"MT"
		},
		"user":
		{
			"domain.name":"domain.com",
			"loginNam":"john.smith"
		}
		"pin": "tokenpin"
	]
the email",
          ...
     }
}


Code Block
languagejs
titleResponse
{
	    "error":0,
	    "result":
	{
		"id": "tokenid1" 
	"the id of the newly created user"}
}