Administrators
Administrator Login
Administrator Login
POST https://octeth.mydomain.com/api.php
This API endpoint, Admin.Login, is primarily used for logging in an administrator into the system. It validates the provided credentials, which include the username and password, and optionally a two-factor authentication code if 2FA is enabled for the account.
Upon successful validation, it returns a session ID which can be used for subsequent API calls. This session ID is crucial as it maintains the state of the logged-in user for further interactions with the API.
Additionally, this endpoint provides the option to disable CAPTCHA during the login process. This can be useful in scenarios where the API is being used to build a separate top UI layer and CAPTCHA might not be necessary or feasible.
In case of any errors during the login process, such as missing or incorrect credentials, missing or invalid CAPTCHA, or incorrect 2FA code, the API endpoint will return specific error codes to help identify the issue.
Request Body
Command*
Admin.Login
Username*
String
Pass admin username
Password*
String
Pass admin password
TFACode
String
Generated two-factor authentication code. This parameter is required if the user has enabled 2FA for the user account.
DisableCaptcha
true
Disables the CAPTCHA for API login. Available options: true, false
TFARecoveryCode
String
Enter the TFA recovery code to reset and disable TFA setup.
{
"Success": true,
"ErrorCode": 0,
"SessionID": "**********",
"AdminInfo": {
"AdminID": "1",
"Name": "Admin Name",
"EmailAddress": "[email protected]",
"Username": "admin",
"Password": "*****",
"2FA_SecretKey": "*****",
"2FA_RecoveryKey": "*****",
"2FA_Enabled": "No",
"Options": []
}
}Error Codes:
1: Missing username
2: Missing password
3: Invalid login credentials
4: Missing captcha
5: Invalid captcha
6: Invalid 2FA code
Update Administrator Account
Update Administrator Account
POST https://octeth.mydomain.com/api.php
This API end-point is designed to update an administrator account on the system. It can be used to validate user account credentials, especially when building a separate top UI layer, or for gathering a session ID for your next user API end-point execution.
Request Body
Command*
Admin.Update
Name*
String
Set the name of the administrator account
Username*
String
Set the username
EmailAddress*
String
Set the email address of the admin account.
Password*
String
Set the new password of the administrator account.
AdminID*
Integer
Set the target administrator ID to update
Error Codes:
1: Missing username.
2: Missing password.
3: Invalid login credentials.
4: Missing captcha.
5: Invalid captcha.
6: Invalid 2FA code.
Last updated
Was this helpful?

