---
name: "getPanelAgentConfigRoleVariableList"
mode: "api"
versionRequirements:
  - { name: "@tuya-miniapp/cloud-api", version: "1.0.6" }
---

## getPanelAgentConfigRoleVariableList

> [VERSION] @tuya-miniapp/cloud-api >= 1.0.6

> 💡 This API relies on cloud capabilities. Configure authorization in the [Mini App Developer Platform](https://platform.tuya.com/miniapp/) under Development Settings - Cloud Capabilities.

### Description

Get the list of role variable configurations.

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `params` | `GetPanelAgentConfigRoleVariableListParams` | Yes | Request body |

### Return Value

Type: `Promise<Object[]>`

GetPanelAgentConfigRoleVariableListResult (see type definitions and minituya response parameters for field meanings)
| Property | Type | Description |
| --- | --- | --- |
| `variableKey` | `number` | Variable key |
| `variableDesc` | `string` | Variable description |

### Referenced Types

##### `interface` GetPanelAgentConfigRoleVariableListParams

| Property | Type | Description |
| --- | --- | --- |
| `devId` | `string` | Device ID |


### Examples

#### Request example

```typescript
import { getPanelAgentConfigRoleVariableList } from '@tuya-miniapp/cloud-api';

const params = {
  devId: 'your_device_id',
};

getPanelAgentConfigRoleVariableList(params)
  .then(result => {
    console.log('Role variable configuration list:', result);
  })
  .catch(error => {
    console.error('Failed to get role variable configuration list:', error);
  });
```

#### Response example

```json
[
  {
    "variableKey": 1001,
    "variableDesc": "Device name"
  },
  {
    "variableKey": 1002,
    "variableDesc": "User nickname"
  }
]
```
