Adding a User to a Group

You can add a user to a group with the addUserToGroup method.

Parameters

Parameter Type Description
credentials (required) credentials Read the description of the Credentials object.
groupId (required) string ID of the group, to which a given user will be added.
userId (required) string ID of a user to be added to a specified group.

Return Value

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

Parameter Type Description
success bool True, if the user has been added to the group.

Possible Errors

Error Description
unknown group A group with the specified ID cannot be found.
unknown user A user with the specified ID cannot be found.
user already group’s member A given user already belongs to a given group.

Sample Call

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <AddUserToGroupRequest xmlns="http://www.articulate-online.com/services/api/1.0/">
      <Credentials>
        <AccountUrl>http://myaccount.ispringonline.com</EmailAddress>
        <Email>email@email.com</Password>
        <Password>password</Password>
      </Credentials>
      <UserID>string</UserID>
      <GroupID>string</GroupID>
    </AddUserToGroupRequest>
  </soap:Body>
</soap:Envelope>

Sample Response

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <AddUserToGroupResult xmlns="http://www.articulate-online.com/services/api/1.0/">
      <Success>True</Success>
    </AddUserToGroupResult>
  </soap:Body>
</soap:Envelope>