# cPanel API 2 Functions - SourceIPCheck::loadsecquestions

Warning:
The cPanel API 2 system is deprecated. We **strongly** recommend that you use [UAPI](/cpanel/introduction) instead of cPanel API 2.

## Description

This function retrieves a specified set of security questions and answers.

Warning:
We **strongly** recommend that you use [UAPI](/cpanel/introduction/) instead of cPanel API 2. However, no equivalent UAPI function exists.

## Examples

WHM API (JSON)


```undefined syntaxhighlighter-pre
https://hostname.example.com:2087/cpsess###########/json-api/cpanel?cpanel_jsonapi_user=user&cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=SourceIPCheck&cpanel_jsonapi_func=loadsecquestions&account=example&q=q1%3A%20What%20was%20your%20high%20school%20mascot%3F&q1answer=Pumas
```

Note:
For more information, read our [Calls from the WHM API](/whm/use-whm-api-to-call-cpanel-api-and-uapi) documentation.

LiveAPI PHP Class


```undefined syntaxhighlighter-pre
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.

// Load security questions for example.com.
$load_security_questions = $cpanel->api2(
    'SourceIPCheck', 'loadsecquestions',
        {
        'account'       => 'example'
        'q1'            => 'What was the name of your first pet?'
        'q1answer'      => 'Snowball2'
        }
    )
 );
```

Note:
For more information, read our [Guide to the LiveAPI System](/guides/guide-to-the-liveapi-system/#guide-to-the-liveapi-system).

LiveAPI Perl Module


```undefined syntaxhighlighter-pre
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.

# Load security questions for example.com.
my $load_security_questions = $cpliveapi->api2(
    'SourceIPCheck', 'loadsecquestions',
    {
        array(        
        'account'       => 'example'
        'q1'            => 'What was the name of your first pet?'
        'q1answer'      => 'Snowball2'

    )
     }
 );
```

Note:
For more information, read our [Guide to the LiveAPI System](/guides/guide-to-the-liveapi-system/#guide-to-the-liveapi-system).

Command Line


```undefined syntaxhighlighter-pre
cpapi2 --user=username loadsecquestions account=example
```

div
Notes:

- You **must** URI-encode values.
- `username` represents your account-level username.
- You **must** include the `--user=username` option.
- For more information and additional output options, read our [Guide to cPanel API 2](/cpanel-api-2/) documentation or run the `cpapi2 --help` command.
- If you run CloudLinux™, you **must** use the full path of the `cpapi2` command:

```undefined syntaxhighlighter-pre
/usr/local/cpanel/bin/cpapi2
```


br
cPanel Tag System (deprecated)

Warnings:
- cPanel tags are **deprecated**. We **strongly** recommend that you **only** use the [LiveAPI](/guides/guide-to-the-liveapi-system) system to call the cPanel APIs. Examples are **only** present in order to help developers move from the old cPanel tag system to our [LiveAPI](/guides/guide-to-the-liveapi-system).
- cPanel API 2 calls that use cPanel tags vary in code syntax and in their output.
- For more information, read our [Deprecated cPanel Tag Usage](/cpanel-api-2/cpanel-api-2-deprecate-cpanel-tag-usage/) documentation.


Output (JSON)


```undefined syntaxhighlighter-pre
{
    "cpanelresult": {
        "func": "loadsecquestions",
        "data": [{
            "answer": null,
            "questionnum": "1",
            "options": [{
                "selectedtxt": "",
                "questionnum": 1
            }, {
                "questionnum": 2,
                "selectedtxt": ""
            }, {
                "selectedtxt": "",
                "questionnum": 3
            }, {
                "selectedtxt": "",
                "questionnum": 4
            }, {
                "selectedtxt": "",
                "questionnum": 5
            }, {
                "questionnum": 6,
                "selectedtxt": ""
            }, {
                "selectedtxt": "",
                "questionnum": 7
            }],
            "question": "What is your primary frequent flyer number?"
        }, {
            "options": [{
                "selectedtxt": "",
                "questionnum": 8
            }, {
                "selectedtxt": "",
                "questionnum": 9
            }, {
                "selectedtxt": "",
                "questionnum": 10
            }, {
                "questionnum": 11,
                "selectedtxt": ""
            }, {
                "questionnum": 12,
                "selectedtxt": ""
            }, {
                "questionnum": 13,
                "selectedtxt": ""
            }, {
                "questionnum": 14,
                "selectedtxt": ""
            }],
            "answer": null,
            "questionnum": "2",
            "question": "What is your maternal grandfather’s first name?"
        }, {
            "options": [{
                "questionnum": 15,
                "selectedtxt": ""
            }, {
                "selectedtxt": "",
                "questionnum": 16
            }, {
                "questionnum": 17,
                "selectedtxt": ""
            }, {
                "selectedtxt": "",
                "questionnum": 18
            }, {
                "questionnum": 19,
                "selectedtxt": ""
            }, {
                "selectedtxt": "",
                "questionnum": 20
            }, {
                "selectedtxt": "",
                "questionnum": 21
            }],
            "questionnum": "3",
            "answer": null,
            "question": "What is your paternal grandmother’s first name?"
        }, {
            "question": "What is the name of your first employer?",
            "answer": null,
            "questionnum": "4",
            "options": [{
                "selectedtxt": "",
                "questionnum": 22
            }, {
                "questionnum": 23,
                "selectedtxt": ""
            }, {
                "questionnum": 24,
                "selectedtxt": ""
            }, {
                "selectedtxt": "",
                "questionnum": 25
            }, {
                "questionnum": 26,
                "selectedtxt": ""
            }, {
                "questionnum": 27,
                "selectedtxt": ""
            }, {
                "selectedtxt": "",
                "questionnum": 28
            }]
        }],
        "event": {
            "result": 1
        },
        "apiversion": 2,
        "module": "SourceIPCheck"
    }
}
```

Note:
Use cPanel's *[API Shell](https://docs.cpanel.net/cpanel/advanced/api-shell-for-cpanel)* interface (*cPanel >> Home >> Advanced >> API Shell*) to directly test cPanel API calls.

## Parameters

table
thead
tr
th
Parameter
th
Type
th
Description
th
Possible values
th
Example
tbody
tr
td
code
account
td
em
string
td
p
The cPanel account for which to load security questions.
p
If you do not use this parameter, the function returns the security questions for all of the cPanel accounts on the server.
td
A valid cPanel account.
td
code
example
tr
td
code
q*
td
em
string
td
p
The security questions.
p
If you do not use this parameter, the function returns all of the cPanel account's security questions.
p
Replace 
code
*
 with the security question's number.
td
A valid string.
td
code
What was the name of your first pet?
tr
td
code
q*answer
td
em
string
td
p
The security question's answer.
p
If you do not use this parameter, the function returns all of the cPanel account's security questions' answers.
p
Replace 
code
*
 with the security question's number.
td
A valid string.
td
code
Snowball2
## Returns

table
colgroup
col
col
col
col
col
thead
tr
th
strong
Return
th
strong
Type
th
strong
Description
th
strong
Possible values
th
strong
Example
tbody
tr
td
code
question
td
em
string
td
p
The security question.
td
Any of the account's security questions.
td
code
What was the name of your first pet?
tr
td
code
options
td
em
array of hashes
td
p
span
A array of hashes of information for each possible question.
p
This function returns seven lists of hashes for each question.
td
This hash contains the 
code
questionnum
 and 
code
selectedtxt
 returns.
td
br
tr
td
code
questionnum
td
em
integer
td
p
The security question's number.
p
The function returns this value in the 
code
options
 hash.
td
Any positive integer.
td
code
1
tr
td
code
selectedtxt
td
em
string
td
p
The security question's text.
p
The function returns this value in the 
code
options
 hash.
td
ul
li
code
""
li
The question's text.
td
code
""
tr
td
p
code
answer
td
em
string
td
p
The security question's answer.
p
This return outputs 
code
null
 unless you specify a value in the 
code
q*answer
 parameter.
td
The question's answer.
td
code
Snowball2
tr
td
code
reason
td
em
string
td
p
A reason for failure.
p
This function only returns a 
code
reason
 value if there was an error.
td
span
A string that describes the error.
td
code
This is an error message.
tr
td
code
result
td
em
Boolean
td
p
Whether the function succeeded.
td
ul
li
code
1
 — The function succeeded.
li
code
0
 — The function failed.
td
code
1