Page tree
Skip to end of metadata
Go to start of metadata

You can add a user into iSpring Learn with the addUser method. 

Permissions to run the request: Account OwnerAdministratorsDepartment Administrators.

Department Administrators can add users only to the department they manage and its daughter departments.

Parameters

Parameter

Type

Description

credentials (required)credentialsRead the description of the Credentials object.
email (optional)stringEmail of the new user.
login (required)stringLogin of the new user.
password (optional)stringPassword of the new user. 
departmentId (required)stringDepartment ID the user will be added to.
sendLoginEmail (optional, default: true)boolParameter that determines whether an email is sent to the added user.
invitationMessage (optional)stringText of an invitation message in the email.
role (required)string

The user might be assigned to one of the roles:

learner
publisher
department_administrator
administrator

groups (optional)string[]An array with the IDs of the groups the user will be added to.

manageableDepartmentIds (required if the user's role is department_administrator or publisher)

string[]

An array with the IDs of the departments the user will manage if their role is Department Administrator or Publisher.

Return Value

After the request has been completed, the system returns an object with the following properties:

Parameter

Type

Description

userIdstringID of the added user.

 Possible Errors

Error

Description

User with the same email is already registered.A user with the specified e-mail address already exists.
User with the same login is already registered.A user with the specified e-mail address already exists.
Number of user accounts is exceededA user hasn't been added because the number of user accounts supported by your subscription plan has been exceeded.
Permission DeniedAn authorized user does not have enough permissions to handle the operation. For example, Department Administrator can't add users to a department they don't manage.
Wrong parametersSome of the sent parameters are incorrect.

Sample Call

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                   xmlns="http://ispringlearn.com/go/services/api/soap">
  <SOAP-ENV:Body>
    <AddUserRequest>
      <credentials>
        <accountUrl>http://myaccount.ispringlearn.com</accountUrl>
        <email>email@email.ru</email>
        <password>password</password>
      </credentials>
      <password>password</password>
      <sendLoginEmail>true</sendLoginEmail>
      <invitationMessage>message</invitationMessage>
      <departmentId>string</departmentId>
      <role>publisher</role>
      <fields>
        <field>
          <name>login</name>
          <value>helen@ispringsolutions.com</value>
        </field>
      </fields>
      <groups>
        <id>string</id>
        <id>string</id>
      </groups>
      <manageableDepartmentIds>
       <id>string</id>
       <id>string</id>
      </manageableDepartmentIds>
    </AddUserRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Sample Response

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                   xmlns="http://ispringlearn.com/go/services/api/soap">
  <SOAP-ENV:Body>
    <AddUserResult>
      <userId>string<userId>
    </AddUserResult>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
  • No labels