---
name: "getLightRhythmsCityInfo"
mode: "kit"
versionRequirements:
  - { name: "@tuya-miniapp/cloud-api", version: "1.0.5" }
---

## getLightRhythmsCityInfo

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

> 💡 该接口为云能力，需开通授权后使用，关于云能力可[查看文档](/cn/miniapp/common/desc/tech-stack/api) 目前云能力在 开发者工具环境无法使用，需要打包后或真机调试使用。

### 描述

获取指定地理位置所在的城市信息。

### 参数

`Params`

| 参数 | 类型 | 必填 | 默认值 | 描述 |
| --- | --- | --- | --- | --- |
| `data` | `CommonLonLatParams` | 是 | - | 请求参数：bizId（业务 ID）、bizType（业务类型，0：设备 1：群组）、lon（经度）、lat（纬度） |

### 引用对象

##### `interface` CommonLonLatParams

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `bizId` | `string` | 业务 ID |
| `bizType` | `0 \| 1` | 业务类型 |
| `lon` | `string` | 经度 |
| `lat` | `string` | 纬度 |


### 示例代码

#### 请求示例

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

getLightRhythmsCityInfo({
  bizId: 'vdevo167504******003',
  bizType: 0,
  lon: '112.233',
  lat: '30.233',
})
  .then((response) => {
    console.log(response);
  })
  .catch();
```

#### 返回示例

```json
{
  "country": "中国",
  "city": "益阳市",
  "province": "湖南省"
}
```
