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

## getPanelAgentCurrentChatEmotion

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

> 💡 This API depends on cloud capabilities. In the Miniapp Developer Platform (https://platform.tuya.com/miniapp/), go to Development Settings > Cloud Capabilities to configure authorization.

### Description

Get the current chat mood.

### Parameters

`Params`

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

### Return Value

Type: `Promise<GetPanelAgentCurrentChatEmotionResult>`

GetPanelAgentCurrentChatEmotionResult (see type definitions and minituya return parameters for field meanings)

##### GetPanelAgentCurrentChatEmotionResult

| Property | Type | Description |
| --- | --- | --- |
| `emotionOpen` | `boolean` | Whether mood is enabled |
| `emotion` | `string` | Mood |
| `text` | `string` | Text |
| `url` | `string` | Image URL |
| `gmtCreate` | `number` | Creation time |
| `gmtModified` | `number` | Update time |

### Referenced Types

##### `interface` GetPanelAgentCurrentChatEmotionParams

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


### Examples

#### Request example

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

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

getPanelAgentCurrentChatEmotion(params)
  .then(result => {
    console.log('Current chat emotion:', result);
  })
  .catch(error => {
    console.error('Failed to get chat emotion:', error);
  });
```

#### Response example

```json
{
  "emotionOpen": true,
  "emotion": "happy",
  "text": "I'm in a great mood now!",
  "url": "https://example.com/happy_emoji.png",
  "gmtCreate": 1699200000000,
  "gmtModified": 1699200300000
}
```
