Adding users

To add users, use the AddUser method. Users are added one at a time.

Required parameters

ParameterDescriptionSupported values
userInfoA group of parameters related to the userUserInfo (has child parameters of its own see the UserInfo child parameters table below)

UserInfo child parameters

Parameter

Description

Supported values

ID

The ID number of the user

<int> Integer

PartnerId

The ID of the customer the user is created for (retrieved through the GetPartnerInfo method)

<int> Integer

Name (required)

A login name for the user (must be the same as the EmailAddress)

OptionalNonEmptyString

Password

Set a password for the new user

OptionalNonEmptyString

RoleId

The ID of the role the user will be given (retrieved through the enumerateUserRoles method)

<int> Integer

Choose Int that correlates to the role below:

  • 1 - SuperUser
  • 2 - Administrator
  • 3 - Manager
  • 4 - Operator
  • 5 - Supporter
  • 6 - Reporter
  • 7 - Notifier

ContactPersonId

The ID of the contact person that this new user will be associated with

<int> Integer

TwoFactorAuthenticationStatus

An array of 2FA state's to give to the new user

TwoFactorAuthenticationState::Enum

  • Undefined
  • Disabled
  • Enabled
  • Count

EmailAddress

The email address of the user (must be the same as the Name given)

<std::String>

Flags

Flag the user with certain feature access

UserFlag::FlagsType

  • Undefined
  • TeamViewer
  • AuthorizedSigner
  • Administrative
  • Technical
  • Sales
  • Billing
  • Count

FirstLoginTime

The time-stamp of the first time the user has logged in successfully

+<std::time_t> Integer in Unix format. For example, 1535673599 stands for August 30, 2018

LastLoginTime

The time-stamp of the last time the user has logged in successfully

<std::time_t> Integer in Unix format. For example, 1535673599 stands for August 30, 2018

FirstName

The first name of the user

<std::String>

FullName

The surname of the user

<std::String>

Title

A title given to the user of the user

<std::String>

PhoneNumber

The phone number of the user

<std::String>

Sample request

{
    "id": "jsonrpc",
    "jsonrpc": "2.0",
    "visa": "{{visa}}",
    "method": "AddUser",
    "params": {
	    "userInfo": {
		"Name" : "[email protected]",
		"PartnerId" : 123456,
		"Password" : "AbC123DeF!",
		"RoleId" : 1,
		"EmailAddress" : "[email protected]",
		"FirstName" : "Backup",
		"FullName" : "Test",
		"Title": "Manager"
	    }
    }
}

Sample response

{
    "id": "jsonrpc",
    "jsonrpc": "2.0",
    "result": {
	"result": 876543
    },
    "visa": "{{visa}}"
}