You can obtain information about a user with the getUserProfile method.

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

 

Parameters

ParameterTypeDescription
credentials (required)credentialsRead the description of the Credentials object.
userId (required)stringID of the user whose information you want to get.


 

Return Value

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

ParameterTypeDescription
userIdstringID of the specified user.
statusintUser status: 1 - active, 2 - deleted, 3 - inactive.
organizationIdintID of the organization the user belongs to.
deactivationDatedateUser's deactivation date.
groupsstring[]Array of IDs of the group the user belongs to.
fieldsstring[][2]Fields of user profile (UserFields). An array of objects with the following properties: name, value.


 

Possible Errors

ErrorDescription
Unknown userThe user with the given ID cannot be found
Permission deniedYou do not have enough permissions to get user info.

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>
    <GetUserProfileRequest>
      <credentials>
        <accountUrl>http://myaccount.ispringlearn.com</accountUrl>
        <email>email@email.com</email>
        <password>password</password>
      </credentials>
      <userId>1</userId>
    </GetUserProfileRequest>
  </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:ns1="http://ispringlearn.com/go/services/api/soap">
  <SOAP-ENV:Body>
    <ns1:GetUserProfileResult>
      <ns1:userProfile>
        <ns1:userId>1</ns1:userId>
        <ns1:fields>
          <ns1:field>
            <ns1:name>login</ns1:name>
            <ns1:value>test</ns1:value>
          </ns1:field>
          <ns1:field>
            <ns1:name>first_name</ns1:name>
            <ns1:value/>
          </ns1:field>
          <ns1:field>
            <ns1:name>last_name</ns1:name>
            <ns1:value/>
          </ns1:field>
          <ns1:field>
            <ns1:name>email</ns1:name>
            <ns1:value>test@test.test</ns1:value>
          </ns1:field>
          <ns1:field>
            <ns1:name>country_id</ns1:name>
            <ns1:value/>
          </ns1:field>
          <ns1:field>
            <ns1:name>customfield</ns1:name>
            <ns1:value/>
          </ns1:field>
        <ns1:status>1</ns1:status>
        <ns1:organizationId>1</ns1:organizationId>
      </ns1:userProfile>
    </ns1:GetUserProfileResult>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>