0

List security questions

by
Published Oct 17, 2025

Returns a collection of security questions and their responses, if any, for your User Profile. > --- - __CLI__. ``` linode-cli security-questions list ``` [Learn more...](https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli) - __OAuth scopes__. ``` account:read_only ``` [Learn more...](https://techdocs.akamai.com/linode-api/reference/get-started#oauth)

Script linode Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
type Linode = {
3
  token: string;
4
};
5
/**
6
 * List security questions
7
 * Returns a collection of security questions and their responses, if any, for your User Profile.
8

9

10
>
11

12
---
13

14

15
- __CLI__.
16

17
    ```
18
    linode-cli security-questions list
19
    ```
20

21
    [Learn more...](https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli)
22

23
- __OAuth scopes__.
24

25
    ```
26
    account:read_only
27
    ```
28

29
    [Learn more...](https://techdocs.akamai.com/linode-api/reference/get-started#oauth)
30
 */
31
export async function main(auth: Linode, apiVersion: "v4" | "v4beta") {
32
  const url = new URL(
33
    `https://api.linode.com/${apiVersion}/profile/security-questions`,
34
  );
35

36
  const response = await fetch(url, {
37
    method: "GET",
38
    headers: {
39
      Authorization: "Bearer " + auth.token,
40
    },
41
    body: undefined,
42
  });
43
  if (!response.ok) {
44
    const text = await response.text();
45
    throw new Error(`${response.status} ${text}`);
46
  }
47
  return await response.json();
48
}
49