> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# Method name: listSecretInfo()

# Method package: wixSecretsBackendV2

# Method menu location: wixSecretsBackendV2 --> secrets --> listSecretInfo

# Method Link: https://dev.wix.com/docs/velo/apis/wix-secrets-backend-v2/secrets/list-secret-info.md

# Method Description:

Retrieves a list of secrets.

> **Note:** This method doesn't return the secret's value for security reasons. To retrieve the value, call [Get Secret Value](https://dev.wix.com/docs/rest/business-management/secrets/get-secret-value.md).



# Method Code Examples:

*** Note: do not assume any prop names or enum values other than the ones in the example.

## Get information about your secrets (dashboard page code)

```javascript
import { secrets } from 'wix-secrets-backend.v2';
import { elevate } from 'wix-auth';

const elevatedListSecretInfo = elevate(secrets.listSecretInfo);

export function getSecretInfo() {
  return elevatedListSecretInfo()
  .then((secrets) => {
    return secrets;
  })
  .catch((error) => {
    console.error(error);
  });
}

/* Returns a Promise that resolves to:
 * {
 *   "secrets": [
 *     {
 *       "id": "2eebccce-6c01-469d-a278-433fd96ba111",
 *       "createdDate": "2020-05-26T06:16:46.000Z",
 *       "updatedDate": "2020-05-28T12:21:10.000Z",
 *       "name": "MyFirstSecret",
 *       "description": "This is my first secret"
 *     },
 *     {
 *       "id": "ef4b43d4-851d-4b52-a07f-9a500a888371",
 *       "createdDate": "2020-06-02T08:23:54.000Z",
 *       "updatedDate": "2020-06-02T08:23:54.000Z",
 *       "name": "MySecondSecret",
 *       "description": "This is my second secret"
 *     }
 *   ]
 * }
 */

```

## Get information about your secrets (export from backend code)

```javascript
import { Permissions, webMethod } from 'wix-web-module';
import { secrets } from 'wix-secrets-backend.v2';
import { elevate } from 'wix-auth';

const elevatedListSecretInfo = elevate(secrets.listSecretInfo);

export const getSecretInfo = webMethod(Permissions.Anyone, () => {
  return elevatedListSecretInfo()
    .then((secrets) => {
      return secrets;
    })
    .catch((error) => {
      console.error(error);
    });
});

/* Returns a Promise that resolves to:
 * {
 *   "secrets": [
 *     {
 *       "id": "2eebccce-6c01-469d-a278-433fd96ba111",
 *       "createdDate": "2020-05-26T06:16:46.000Z",
 *       "updatedDate": "2020-05-28T12:21:10.000Z",
 *       "name": "MyFirstSecret",
 *       "description": "This is my first secret"
 *     },
 *     {
 *       "id": "ef4b43d4-851d-4b52-a07f-9a500a888371",
 *       "createdDate": "2020-06-02T08:23:54.000Z",
 *       "updatedDate": "2020-06-02T08:23:54.000Z",
 *       "name": "MySecondSecret",
 *       "description": "This is my second secret"
 *     }
 *   ]
 * }
 */

```

## Retrieve a name and get a secret's value 

```javascript
import { Permissions, webMethod } from 'wix-web-module';
import { secrets } from 'wix-secrets-backend.v2';
import { elevate } from 'wix-auth';

const elevatedGetSecretValue = elevate(secrets.getSecretValue);
const elevatedListSecretInfo = elevate(secrets.listSecretInfo);

export const getFirstSecretValue = webMethod(Permissions.Anyone, () => {
  return elevatedListSecretInfo()
    .then((secrets) => {
      return elevatedGetSecretValue(secrets[0].name);
    })
    .catch((error) => {
      console.error(error);
    });
});

/*
 * Returns a Promise that resolves to:
 *
 * "Fm8OfflH6bJOwWjenqAtLurLbkiMNvmhQHZV+118"
 */

```

## Retrieve an ID and delete a secret 

```javascript
import { Permissions, webMethod } from 'wix-web-module';
import { secrets } from 'wix-secrets-backend.v2';
import { elevate } from 'wix-auth';

const elevatedListSecretInfo = elevate(secrets.listSecretInfo);
const elevatedDeleteSecretValue = elevate(secrets.deleteSecret);

export const deleteFirstSecret = webMethod(Permissions.Anyone, () => {
  return elevatedListSecretInfo()
    .then((secrets) => {
      return elevatedDeleteSecretValue(secrets[0].id);
    })
    .then(() => {
      console.log('Secret deleted');
    })
    .catch((error) => {
      console.error(error);
    });
});

```

---