You can remove a user from a group with the removeUserFromGroup method.

Permission to run the request: Account Owner, Administrator, Organization Administrator. 

 

Parameters

ParameterTypeDescription
credentials (required)credentialsRead the description of the Credentials object.
groupId (required)stringID of the group you want to delete the specified user from.
userId (required)stringID of the user you want to delete from the specified group.


Return Value

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

ParameterTypeDescription
successbool'True' if the given user has been removed from the group.


Possible Error

Text
Description
Unknown userThe specified user hasn't been found.
Unknown groupThe specified group hasn't been found.
Permission DeniedYou don't have permissions to edit the specified group info.
User not a group's memberA given user does not belong to the specified group.
Wrong parametersThe system failed to process the request because it did not contain all necessary parameters.


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>
    <RemoveUserFromGroupRequest>
      <credentials>
        <accountUrl>http://myaccount.ispringlearn.com</accountUrl>
        <email>email@email.com</email>
        <password>password</password>
      </credentials>
      <userId>1</userId>
      <groupId>2</groupId>
    </RemoveUserFromGroupRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML

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>
    <RemoveUserFromGroupRequest>
      <success>true</success>
    </RemoveUserFromGroupRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML