You can obtain information about a user with the getUserProfile method.
Permission to run the request: Account Owner, Administrator, Organization Administrator.
Parameter | Type | Description |
---|---|---|
credentials (required) | credentials | Read the description of the Credentials object. |
userId (required) | string | ID of the user whose information you want to get. |
After the request has been completed, the system returns an object with the following properties.
Parameter | Type | Description |
---|---|---|
userId | string | ID of the specified user. |
status | int | User status: 1 - active, 2 - deleted, 3 - inactive. |
organizationId | int | ID of the organization the user belongs to. |
deactivationDate | date | User's deactivation date. |
groups | string[] | Array of IDs of the group the user belongs to. |
fields | string[][2] | Fields of user profile (UserFields). An array of objects with the following properties: name, value. |
Error | Description |
---|---|
Unknown user | The user with the given ID cannot be found |
Permission denied | You do not have enough permissions to get user info. |
<?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> |
<?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> |