Description
This function saves a set of security questions and answers. The system uses these questions when users attempt to log in to cPanel or Webmail from an untrusted IP address.
Warning:
We strongly recommend that you use UAPI instead of cPanel API 2. However, no equivalent UAPI function exists.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Input |
Type |
Description |
Possible values |
Example |
account |
string |
Required The account for which to add security questions. |
Any valid account. |
example.com |
q*answer |
string |
Required The answer to each security question. Important:
|
The answer that will correspond to the security question of the same incremental value.
|
q1answer: Snowball2 |
q*ques |
|
Required The security questions.
|
The questions that correspond to the answer of the same incremental value. |
q1ques: What was the name of your first pet? |
Returns
Return |
Type |
Description |
Possible values |
Example |
status |
Boolean |
Whether the function added the security questions and answers. |
|
1 |
reason |
string |
A reason for failure. Note: This function only returns a reason value if there was an error. |
A string that describes the error. |
This is an error message. |
result |
Boolean |
Whether the function succeeded. |
|
1 |