SonaActivateUser
Description¶
This function activates a user’s inactive account. If the user’s account is already active, the function’s numeric output will indicate as such. This is the login_allowed field in the user’s account.
Input Parameters¶
Below are the following input parameters for use with the SonaActivateUser API function.
| Parameter | Description / Possible Values |
|---|---|
api_key |
Use API key generated for Sona admin user |
person_id |
The numeric identifier of the user. |
Output Parameters¶
Will return an integer value of 1 indicating a successful activation, or 2 indicating that the user’s account is already activated.
Error Codes¶
Below are the possible error messages encountered and their respective descriptions.
| Error Type | Error Code | Description |
|---|---|---|
| Authentication Failed | -1 through -7 | Standard authentication errors |
Invalid person_id |
-8 | person_id entered is invalid |
| Person_id not found | -9 | person_id entered is not found |
Sample Input¶
Request URL
https://myschool.sona-systems.com/services/SonaAPI.svc/SonaActivateUser?api_key=YOUR_API_KEY&person_id=15URL components
| Component | Value |
|---|---|
| Scheme | https |
| Host | myschool.sona-systems.com |
| Service path | /services/SonaAPI.svc |
| Function | SonaActivateUser |
Query parameters
Sample Output¶
<SonaActivateUserResponse
xmlns="https://www.sona-systems.com/"
xmlns:a="http://schemas.datacontract.org/2004/07/emsdotnet.sonasystems"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<SonaActivateUserResult>
<a:Errors i:nil="true" />
<a:Result>1</a:Result>
</SonaActivateUserResult>
</SonaActivateUserResponse>